#include <Force.h>
The stiffness k is provided, along with an arbitrary "zero" coordinate value q0 at which the spring generates no force. The generated force is k*(q-q0), and potential energy is pe = 1/2 k (q-q0)^2. This is not meaningful unless the mobility coordinate is such that qdot=u for that coordinate. In particular, do not use this on a coordinate which is part of a quaternion.
Public Member Functions | |
MobilityLinearSpring (GeneralForceSubsystem &forces, const MobilizedBody &body, int coordinate, Real k, Real q0) | |
Create a MobilityLinearSpring. | |
SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS (MobilityLinearSpring, MobilityLinearSpringImpl, Force) |
MobilityLinearSpring | ( | GeneralForceSubsystem & | forces, | |
const MobilizedBody & | body, | |||
int | coordinate, | |||
Real | k, | |||
Real | q0 | |||
) |
Create a MobilityLinearSpring.
forces | the subsystem to which this force should be added | |
body | the body to which the force should be applied | |
coordinate | the index of the coordinate in the body's u vector to which the force should be applied | |
k | the spring constant | |
q0 | the value of the coordinate at which the force is 0 |
SimTK_INSERT_DERIVED_HANDLE_DECLARATIONS | ( | MobilityLinearSpring | , | |
MobilityLinearSpringImpl | , | |||
Force | ||||
) |