How can I obtain angular veloctiy as a different euler angle sequence

Typically: "How do I... ", "How can I... " questions
Post Reply
Ganto
Posts: 2
Joined: 09 Sep 2019, 10:11

How can I obtain angular veloctiy as a different euler angle sequence

Post by Ganto » 09 Sep 2019, 11:17

Hello VREP forum,

For my robotic model I used a different euler sequence convention (ZYX intrinsic) than VREP does (XYZ intrinsc).
So far I have converted the angles using quaternions as intermediate representations.

However I am not so sure how angular velocities should be handled. First of all I assume simGetVelocity returns the derrivatives of the euler angles [based on this post : http://www.forum.coppeliarobotics.com/v ... php?t=6780].
How would I then convert the euler angle derrivatives to the converntion I used ? Is it still valid to convert them to quaternions first ?

coppelia
Site Admin
Posts: 7330
Joined: 14 Dec 2012, 00:25

Re: How can I obtain angular veloctiy as a different euler angle sequence

Post by coppelia » 10 Sep 2019, 15:38

Hello,

I think that as far as your angular velocity is small, Euler angles work fine, since rotation order doesn't really matter. So, correct me if I am wrong, XYZ instrinsic == ZYX instrinsic. The Euler angles that sim.getVelocity returns are expressed relative to the world reference frame, and not relative to the object that is rotating.
to be sure, I'd recommend computing the velocity yourself, from one simulation frame to the next (or if you do that inside of the dynamics callback, you could do it from one dynamics step to the next).
In general, it is much more intuitive with less confusions to compute an angular velocity that gives you a rotation axis and a rotation velocity around that axis. To do that, you can use following API function: sim.getRotationAxis.

Cheers

Ganto
Posts: 2
Joined: 09 Sep 2019, 10:11

Re: How can I obtain angular veloctiy as a different euler angle sequence

Post by Ganto » 23 Sep 2019, 16:17

Thanks for your helpful answers !

However I still have one question, and also excuse me for the delayed response.

I am still not sure what getSimVelocity returns. Are these the Euler angles or the angular velocities ? After reading through this thread http://forum.coppeliarobotics.com/viewtopic.php?t=7370, it seems that instead angular velocities are returned.

Best,
Ganto

coppelia
Site Admin
Posts: 7330
Joined: 14 Dec 2012, 00:25

Re: How can I obtain angular veloctiy as a different euler angle sequence

Post by coppelia » 24 Sep 2019, 06:55

Hello,

sim.getVelocity returns the velocity that each physics engine provides (i.e. calculated by the physics engines). Those are derived Euler angles.

Cheers

Post Reply