Skip to content

raisim::PinConstraint ​

class · #include <raisim/constraints/PinConstraint.hpp>

Internal: a resolved point constraint between two bodies of one articulated system. A pin keeps the two anchors coincident; an equality constraint keeps them coincident along its axes only.

Constructors & destructor ​

PinConstraint ​

cpp
PinConstraint(
    size_t localIdx1,
    Vec<3> pos1_b,
    size_t localIdx2,
    Vec<3> pos2_b)

Parameters

ParameterDescription
localIdx1 (in)body index of body1
pos1_b (in)anchor in body1's frame
localIdx2 (in)body index of body2
pos2_b (in)anchor in body2's frame

~PinConstraint ​

cpp
virtual ~PinConstraint() = default

Public attributes ​

pos1_b ​

cpp
Vec<3> pos1_b

Anchor position in body1 frame.

pos2_b ​

cpp
Vec<3> pos2_b

Anchor position in body2 frame.

pos1_w ​

cpp
Vec<3> pos1_w

Anchor position in world frame for body1.

pos2_w ​

cpp
Vec<3> pos2_w

Anchor position in world frame for body2.

localIdx1 ​

cpp
size_t localIdx1

Local body index for body1.

localIdx2 ​

cpp
size_t localIdx2

Local body index for body2.

contactA ​

cpp
size_t contactA

Contact indices of the anchors on body1 and body2 in this step (size_t(-1) if the body is static).

contactB ​

cpp
size_t contactB

problem ​

cpp
size_t problem

Index of this pin's row in the world's contact problems in this step.

axisCount ​

cpp
size_t axisCount

Constrained directions in body1's frame, the first axisCount columns; 0 means a pin (all three world axes).

axes_b ​

cpp
Mat<3, 3> axes_b

RaiSim — physics for robotics and AI.