API
4.3
For MATLAB, Python, Java, and C++ users
|
This class provides utilities for creating OpenSim models. More...
Static Public Member Functions | |
Create a model | |
static Model | createNLinkPendulum (int numLinks) |
Create a pendulum with the provided number of links. More... | |
static Model | createPendulum () |
This is a convenience for createNLinkPendulum(1) . More... | |
static Model | createDoublePendulum () |
This is a convenience for createNLinkPendulum(2) . More... | |
static Model | createSlidingPointMass () |
This model contains: More... | |
static Model | createPlanarPointMass () |
This model contains: More... | |
Modify a Model | |
static void | replaceMusclesWithPathActuators (Model &model) |
Replace muscles in a model with a PathActuator of the same GeometryPath, optimal force, and min/max control defaults. More... | |
static void | removeMuscles (Model &model) |
Remove muscles from the model. More... | |
static void | replaceJointWithWeldJoint (Model &model, const std::string &jointName) |
Replace a joint in the model with a WeldJoint. More... | |
static void | createReserveActuators (Model &model, double optimalForce, double bound=SimTK::NaN, bool skipCoordinatesWithExistingActuators=true) |
Add CoordinateActuators for each unconstrained coordinate (e.g., ! Coordinate::isConstrained() ) in the model, using the provided optimal force. More... | |
This class provides utilities for creating OpenSim models.
|
inlinestatic |
This is a convenience for createNLinkPendulum(2)
.
|
static |
Create a pendulum with the provided number of links.
For each link, there is a body /bodyset/b#
(where #
is the link index starting at 0), a PinJoint /jointset/j#
with coordinate /jointset/j#/q#
, a CoordinateActuator /tau#
, a Marker /markerset/marker#
at the origin of the link's body, and a PhysicalOffsetFrame /b#center
at the center of the link.
|
inlinestatic |
This is a convenience for createNLinkPendulum(1)
.
|
static |
This model contains:
|
static |
Add CoordinateActuators for each unconstrained coordinate (e.g., ! Coordinate::isConstrained()
) in the model, using the provided optimal force.
Increasing the optimal force decreases the required control signal to generate a given actuation level. The actuators are added to the model's ForceSet and are named "reserve_<coordinate-path>" with forward slashes converted to underscores. The bound
argument, if supplied, sets the min and max controls to -bound
and bound
, respectively. The fourth (optional) argument specifies whether or not to skip coordinates that already have CoordinateActuators associated with them (default: true).
Referenced by OpenSim::ModOpAddReserves::operate().
|
static |
This model contains:
/bodyset/body
./jointset/slider
, with coordinate /jointset/slider/position
./actuator
. Gravity is default; that is, (0, -g, 0).
|
static |
Remove muscles from the model.
Referenced by OpenSim::ModOpRemoveMuscles::operate().
|
static |
Replace a joint in the model with a WeldJoint.
Referenced by OpenSim::ModOpReplaceJointsWithWelds::operate().
|
static |
Replace muscles in a model with a PathActuator of the same GeometryPath, optimal force, and min/max control defaults.