I have an IMU in NED of which I need to rotate to ENU to conform with ROS. I know its a roll of pi and a yaw of pi/2 but what does this look like mathematically? Below is an example of what I think so far, however, as you can see I need help with a bit. Thanks everyone :)

new_roll = roll
new_pitch = -pitch
new_yaw = pi/2 - yaw

new_angular_x = ?
new_angular_y = ?
new_angular_z = ?

new_linear_x = ?
new_linear_y = ?
new_linear_z = ?


new_roll = roll
new_pitch = -pitch
new yaw = pi/2 - yaw

new_angular_x = angular_x (roll doesn't change?)
new_angular_y = -angular_y
new_angular_z = -angular_z

new_linear_x = linear_x
new_lianer_y = -linear_y
new_linear_z = -linear_z

You can google this pretty easily. One of the first links I found is this.

Anyways to answer your questions.

First thing is that the conventions of roll,pitch yaw don't really mean much in this case cause they are fixed to the vehicle. So your code of "new_roll=..." doesn't really make sense cause roll is the same no matter what.

The conversion can be easily seen from the convention names. NED=ENU/ which means





Which means


and same thing for the gyroscope data.

Generally I would say it is easier to think of this with rotation matrices. Which allows you to deal with this via multiplication rather than hand coding the swaps yourself.

  • $\begingroup$ So if I have a c++ driver for an imu, and I am trying to apply transforms to rotate it to ENU, I would set equal to my edit? $\endgroup$
    – Grant Dare
    Nov 5 '19 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.