How to get the world coordinate of a joint

nick.b.amato
Community Visitor

How to get the world coordinate of a joint

nick.b.amato
Community Visitor
Community Visitor

I have a few joints that I need to get the coordinates of in the world context. The joints connect a component to the rest of the assembly. In the image, the wheel is connected to a bearing on the other side of the black beam via the revolute joint. The bearing and all other components in the assembly (beams, bearings, brackets) are all in a rigid group. 

nickbamato_0-1688335142776.png

As far as my understanding, geometryOrOriginOne returns the geometry for the joint that contains the origin in the component context, which is why when I try to get the position of every joint they return the same position.

 

for (auto& joint : root->allJoints()) {
    auto origin = joint->geometryOrOriginOne()->cast<JointGeometry>()->origin();
}

 

 

How do I get world coordinates of the joints?

0 Likes
Reply
164 Views
0 Replies
Replies (0)