?PhysioOpenSim now answers: a package help page gives one paragraph on what the
package is for, the main entry points grouped by task, and where to go next.@examples added or corrected across 1 help pages. Each runs
offline in seconds, writes nothing outside tempdir(), and is executed by
R CMD check; anything needing a device, a download or an optional backend is
fenced with the reason stated.opensimTemplatePath() returns the path of a bundled tool setup-template XML
("ik", "id", "so", "cmc", "rra", "analyze", "generic"), for use
as the template_file argument of the opensimWrite*SetupFromTemplate()
writers. The templates now ship in inst/extdata/ (production location) rather
than inst/testdata/.test-opensim-parity.R) that broke the Windows binary builds. The setup
writer normalizes output paths via normalizePath(mustWork = FALSE), which
leaves a non-existent relative path unchanged on Linux/macOS but absolutizes it
on Windows; the test now matches the <output_gen_force_file> tag by basename
so it passes on all platforms. No change to package behaviour.InverseDynamicsTool loads a PhysioOpenSim-generated ID setup and
reads its numeric fields (time_range, lowpass) back exactly (recorded in the
bundled reference). A bundled real model (inst/extdata/arm26.osim, from
opensim-models) plus its OpenSim summary now back the native-parser parity on
OpenSim-enabled builds, replacing the PHYSIO_OPENSIM_MODEL env var.
Generated by data-raw/opensim_reference.{R,py} (OpenSim 4.6).Initial release as a standalone package in the x-biosignal (PhysioExperiment) ecosystem. PhysioOpenSim provides a native OpenSim C++ bridge for R via Rcpp, exposing model-level operations and full-tool execution to support biomechanics workflows. OpenSim linkage is optional at build time; when OpenSim is not detected, the package still installs and OpenSim-dependent calls fail with informative runtime errors.
Build and availability introspection so downstream code can adapt to the local environment:
opensimAvailable() reports whether the package was compiled with OpenSim
headers and libraries linked, and opensimBuildConfig() returns the
detection method and compilation status.opensimCLIPath() resolves the opensim-cmd executable (via the argument,
the OPENSIM_CLI environment variable, or PATH) and
opensimCLIAvailable() checks resolvability without raising an error.Native OpenSim model handles backed by C++ external pointers:
opensimLoadModel() loads an .osim model into a PhysioOpenSimModel
handle, with opensimModelInitialize() and opensimModelIsInitialized()
managing the system state.opensimModelSummary() returns structural metadata (body, joint, marker,
muscle, and coordinate counts plus total mass) from a file path or a loaded
handle, and opensimModelComponents() lists the corresponding component
names.opensimModelName(), opensimSetModelName(),
opensimFinalizeConnections(), and opensimSaveModel() inspect, rename,
finalize connections on, and serialize a model back to XML.Tool execution with a dual native/CLI backend selected via the execution
argument ("auto", "native", or "cli"):
opensimRunTool() runs any tool setup XML, returning a structured result
with execution mode, status, captured stdout/stderr, and elapsed time,
and supporting a working directory, extra CLI arguments, a timeout, and
optional fail-on-error.opensimRunIK(), opensimRunID(), opensimRunSO(),
opensimRunAnalyze(), opensimRunCMC(), and opensimRunRRA() cover
inverse kinematics, inverse dynamics, static optimization, analysis,
computed muscle control, and the residual reduction algorithm.Setup XML templating that fills tag values in an existing OpenSim template:
opensimWriteToolSetupFromTemplate() performs tag replacement with strict
or permissive handling of missing tags and reports applied and missing
tags.opensimWriteIKSetupFromTemplate(),
opensimWriteIDSetupFromTemplate(), opensimWriteSOSetupFromTemplate(),
opensimWriteAnalyzeSetupFromTemplate(),
opensimWriteRRASetupFromTemplate(), and
opensimWriteCMCSetupFromTemplate() normalize model, motion, marker, and
loads paths and accept an optional time range and results directory for
each tool.