raisim::ArticulatedSystem::JointRef
class · #include <raisim/object/ArticulatedSystem/ArticulatedSystem.hpp>
Lightweight handle to a joint (coordinate frame) of an ArticulatedSystem, obtained by getJoint(). It stores a raw pointer to the system, which must outlive the handle. Joint-coordinate accessors are fatal for fixed joints.
Constructors & destructor
JointRef
JointRef(size_t frameId, ArticulatedSystem *system)Parameters
| Parameter | Description |
|---|---|
frameId (in) | index of the joint's coordinate frame (see getFrameIdxByName()) |
system (in) | the owning articulated system |
Public member functions
getPosition
void getPosition(Vec<3> &position) constParameters
| Parameter | Description |
|---|---|
position (out) | world-frame position of the joint frame [m] |
getOrientation
Mat<3, 3> getOrientation() constReturns world-frame orientation of the joint frame
getPose
void getPose(Vec<3> &position, Mat<3, 3> &orientation) constParameters
| Parameter | Description |
|---|---|
position (out) | world-frame position of the joint frame [m] |
orientation (out) | world-frame orientation of the joint frame |
getJointCoordinate
void getJointCoordinate(VecDyn &coordinate) constGet this joint's segment of the generalized coordinate.
Parameters
| Parameter | Description |
|---|---|
coordinate (out) | resized to 1 (revolute/prismatic), 4 (spherical, quaternion w,x,y,z) or 7 (floating: position + quaternion). Fatal for a fixed joint. |
getJointAngle
double getJointAngle() constOnly for revolute and prismatic joints (fatal otherwise).
Returns joint position [rad or m]
getPositionInParentFrame
const raisim::Vec<3> &getPositionInParentFrame() constFatal for a fixed joint.
Returns joint position relative to the parent body, expressed in the parent body frame [m] (see ArticulatedSystem::getJointPos_P())
getJointAxis
const raisim::Vec<3> &getJointAxis() constFatal for a fixed joint.
Returns joint axis expressed in the joint frame (see ArticulatedSystem::getJointAxis_P())
getType
Joint::Type getType() constReturns joint type
getIdxInGeneralizedCoordinate
size_t getIdxInGeneralizedCoordinate() constReturns index of this joint's first element in the generalized coordinate, or size_t(-1) for a fixed joint
getLinearVelocity
Vec<3> getLinearVelocity() constReturns world-frame linear velocity of the joint frame origin [m/s]