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

Description

This class is a thin wrapper to Simbody's SimTK::Force::DiscreteForces class.

Adding this component to a Model will add corresponding slots in the State for discrete variables holding the most recent value of the forces set through the component. Discrete variables are not updated through the same realization mechanisms as typical continuous variables are, and so must be manually updated before realizing to acceleration whenever their values change. However, this class is mainly used within MocoProblemRep and classes derived from MocoSolver to handle constraint forces, and 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::DiscreteForces:

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

Public Member Functions

void setAllForces (SimTK::State &s, const SimTK::Vector &generalizedForces, const SimTK::Vector_< SimTK::SpatialVec > &bodyForcesInG) const
 

Protected Member Functions

void extendAddToSystem (SimTK::MultibodySystem &system) const override
 

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