What does RootNode refer to in MotionTarget.getSimWorldToRootNode()

Hello everyone

I have a linear axis robot and would like to calculate the flange’s reference position (position where all joints have a value of zero).

For that I make use of the MotionTarget class, since it has some useful functions to calculate certain positions.

I tried it this way:

target = robotController.createTarget()

jointValues = [0.0] * len(target.JointValues)
target.JointValues = jointValues

flangePos = target.getSimWorldToRootNode()
flangePos *= target.getRobotRootToRobotFlange()

But when I do so, the position in “flangePos” is not correct.

By further investigating this, I realized that the method “getSimWorldToRootNode()” always gives me the same position even when I move the component’s origin.

So my question is what exactly does “RootNode” refer to in this method?

Thanks for any help!

This is the description of getSimWorldToRootNode() on the help document: Returns the offset from 3D world origin to root node. Tested and it seems to do the work. See image below.

Hi Jay


Thanks for your answer!

I know right? It should actually return the position of the component in world coordinate system but it doesn’t in my simulation.

As I mentioned I think this happens because I moved the component’s origin.

Because when I move the origin the rootPos stays the same, it only changes when I move the component as a whole (including geometry).

Is this maybe a bug or do I get something wrong?

What happens on your side when you move the robots origin?


I appreciate your support!



PS: The version I use is Visual Components 4.1 Professional