OpenSim Moco  0.4.0
Public Member Functions | List of all members
OpenSim::AccelerationMotion Class Reference

Description

This class is a thin wrapper to Simbody's SimTK::Motion for prescribing the acceleration of all degrees of freedom (UDot), and is used when enforcing dynamics using implicit differential equations (UDot is supplied by the solver, not by Simbody).

This component adds discrete variables for holding onto the user-supplied UDot and passing it onto the SimTK::Motion. Then, SimbodyMatterSubsystem::findMotionForces() provides the "implicit" differential equation residual (akin to SimbodyMatterSubsystem::calcResidualForce()). By default, the prescribed motions are disabled; see setEnabled(). This prescribed motion does not add constraints to the system; rather, this class removes degrees of freedom. This class is not intended for use outside of Moco. The wrapper to OpenSim is necessary so that the discrete variables appear in the State whenever initSystem() is called on a model.

Inheritance diagram for OpenSim::AccelerationMotion:

#include <Moco/Moco/Components/AccelerationMotion.h>

Public Member Functions

 AccelerationMotion (std::string name)
 
void setUDot (SimTK::State &state, const SimTK::Vector &fullUDot) const
 Set the UDot vector. The vector must have size SimTK::State::getNU().
 
const SimTK::Vector & getUDot (const SimTK::State &state, SimTK::MobilizedBodyIndex mobodIdx) const
 Get the subset of UDots for the requested MobilizedBody.
 
void setEnabled (SimTK::State &state, bool enabled) const
 Use this to set whether the prescribed acceleration motion is used or not. More...
 

Member Function Documentation

◆ setEnabled()

void OpenSim::AccelerationMotion::setEnabled ( SimTK::State &  state,
bool  enabled 
) const

Use this to set whether the prescribed acceleration motion is used or not.


The documentation for this class was generated from the following file: