Get joint's relative transform from parent joint

How to correctly get one joint’s relative transform from its parent joint?

Thorugh testing, i guess once a skeleton is created, the joint will not rotate or translate, indeed it’s the bodyNodes’ changing transformation.

I am not sure whether this is correct, but i found no direct way to get one joint’s relative transform from its parent joint.

You can simply do

Eigen::Isometry3d tf = joint->getTransformFromParentBodyNode();

You are correct that this transform will remain constant during a regular simulation. If you want to change it at any time, you can do

joint->setTransformFromParentBodyNode(tf);

Just be aware that this changes the physical properties of the skeleton, so it would introduce a discontinuity into the simulation, which can produce bad simulation results if it’s done carelessly.

thank you, that works