raisim::ArticulatedSystem::SpringElement
struct · #include <raisim/object/ArticulatedSystem/ArticulatedSystem.hpp>
A linear/torsional spring acting at the joint of a body (see addSpring()).
Constructors & destructor
SpringElement
cpp
SpringElement()Public member functions
setSpringMount
cpp
void setSpringMount(const Eigen::Vector4d &qRef)Parameters
| Parameter | Description |
|---|---|
qRef (in) | spring rest configuration (see q_ref) |
getSpringMount
cpp
Eigen::Vector4d getSpringMount()Returns spring rest configuration (see q_ref)
Public attributes
childBodyId
cpp
size_t childBodyIdBody index of the body whose parent joint the spring acts on.
stiffness
cpp
double stiffnessspring stiffness [Nm/rad or N/m]
q_ref
cpp
Vec<4> q_refRest configuration: q_ref[0] for revolute/prismatic joints, a rotation quaternion (w,x,y,z) for spherical joints (addSpring() normalizes it; a zero one, the default, is fatal there)