Downloads the subject-specific, scaled OpenSim model (.osim) that
OpenCap produced for a session. This model is the input the local OpenSim
toolchain needs (runOpenSimFromMarkers /
runOpenSimFromOpenCap): OpenCap builds and scales it in the
cloud from the neutral/calibration trial, and PhysioOpenSim provides no
scaling tool of its own, so the model must come from OpenCap.
Usage
downloadOpenCapModel(
session_id,
trial_id = NULL,
api_key = NULL,
base_url = "https://app.opencap.ai/api",
dest = NULL
)Arguments
- session_id
Character string giving the OpenCap session identifier (the 36-character UUID at the end of the session URL).
- trial_id
Character string giving the trial identifier within the session. If
NULL(default), the first trial in the session is used.- api_key
Character string with the OpenCap API key. If
NULL(default), the key is read from theOPENCAP_API_KEYenvironment variable.- base_url
Character string giving the base URL for the OpenCap API. Default is
"https://app.opencap.ai/api".- dest
Character path to write the model to. If
NULL(default) a temporary.osimfile is created.
Details
Requires the httr package and an OpenCap API key (see
readOpenCap). The model URL is taken from the session
metadata when present and otherwise constructed from the documented
session endpoint.