Skip to content

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

ParameterDescription
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 childBodyId

Body index of the body whose parent joint the spring acts on.

stiffness ​

cpp
double stiffness

spring stiffness [Nm/rad or N/m]

q_ref ​

cpp
Vec<4> q_ref

Rest 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)

RaiSim — physics for robotics and AI.