How to convert angular velocity when applying a rotation

Discussion in 'Simulation' started by Henry Charlesworth, Feb 18, 2020.

  1. I have a situation where I'm using the FetchPush environment from openAI gym. I want to be able to save the state, make some modifications which should physically change nothing, and then reload the state. When I get the simulation state this gives me a qpos and qvel vector - the qpos is a vector of length 22, and the last 4 elements are a quaternion representing the orientation of the object (a cube) and qvel is a vector of length 21 (I assume the last 3 elements are the angular velocity). Physically, because the object is a cube you should be able to apply rotations to its state without really changing the underlying physics - so if for example if I change the orientation to q_current * [0, 1, 0, 0] (quaternion multiplication) and then re-load and render this new state then I can see that nothing changes visually. What I'm not sure about is how to do something similar to the angular velocity, such that when I modify the orientation in this way and update the angular velocity then advancing the simulation forward will be the same as if I hadn't made any modifications at all.

    I came across: https://en.wikipedia.org/wiki/Rotat...ee_dimensions#Quaternion_↔_angular_velocities which seems relevant, but I haven't been able to use this so far to get what I want.