Free Joint Changing Axis?

Discussion in 'Modeling' started by William Curran, May 14, 2018.

  1. I have a software suite that reads in a URDF and uses that model in it's controller. I simulate this in Gazebo. This has worked for a while, but I'm in the process of switching from Gazebo to Mujoco.

    Converting the URDF to a Mujoco model was really easy, but with one issue. I have a starting orientation for my model, and when I apply it the starting orientation is 'flipped'. I can alleviate this problem by using the negative of all axis (i.e. 0 0 1 becomes 0 0 -1). However, that breaks my URDF-based controller code, since the axis aren't consistent.

    What's interesting is that if I don't use a free joint, my orientation is fine, however the robot floats since it's latched to the world.

    Why is the free joint changing the orientation of my axis?

    Thank you.
     

    Attached Files:

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The free joint should not be changing any axis orientations... there are many MuJoCo models imported from URDFs and this has not been seen before. What do you mean by "apply the starting orientation"? Are you setting a quaternion programmatically? If so, note that MuJoCo uses the convention (w, x, y, z) for quaterions... If this is not the problem, please send me the URDF and tell me more about what you are doing and I will experiment with it.