How to know the endpoint coordinates of a robot ? #4073
-
Hi guys ! I am currently working with the Trunk example of the SoftRobots plugin. In my application I need to know the coordinates of the endpoint of the trunk below In your opinion what would be the best way to do this ? I was thinking to attach an object with no mass to it and obtain its position but I think there is an easier way to do this. Thanks ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Let's say that the index of the trunk tip in the volumetric mesh that you use is myMO = objectNode.addObject("MechanicalObject", template="Vec3d", name="MO") What you can do to access in read access the position of the tip is : myMO.position.value[tipIndex] I hope this helps |
Beta Was this translation helpful? Give feedback.
Hi @ISIR-GuillaumeS
Let's say that the index of the trunk tip in the volumetric mesh that you use is
tipIndex
and that you create your MechanicalObject as follows:What you can do to access in read access the position of the tip is :
I hope this helps