Description
Reported by user (Johan2021) on Discord,:
Hi, I am using a ballJoint with 3 rotational motors as shown in the extract, to control a robot joint. The jointParameters nodes specify the axes of rotation (https://cyberbotics.com/doc/reference/jointparameters?tab-language=python). When I spawn the model with a different orientation (either inside the proto file or the wbt file), these axes seem to be in absolute coordinates, and not w.r.t. the body frame. While if the robot is spawned with zero rotation, the axes remain expressed w.r.t. the body frame while the robot is moving and changing its global orientation. Is this intended or is there a way to express the axes in relative coordinates?
This can be reproduced with the motor3.wbt
:
- Open the
motor3.wbt
simulation - Run some steps of simulation: the end point moves in directiion of the robots' z-axis
- Reload the simulation and change the
Robot.rotation
value to0 1 0 1.57
- Run some steps of simulation
-> it would be expected that the end point still moves in direction of the robot's z-axis but it moves in -x-axis direction (exactly the same as before rotating the top robot node)
BallJoint axes should be defined in local coordicates w.r.t parent node (as for all the other joints) and correctly updated when an ancestor node is moved.