2
$\begingroup$

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 = ?

EDIT

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
$\endgroup$

1 Answer 1

1
$\begingroup$

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

North(Roll/X)=East

East(Pitch/Y)=North

Down(Yaw/Z)=Up

east_ENU=NORTH_NED
north_ENU=EAST_NED
up_ENU=-DOWN_NED

Which means

new_angular_x(EAST_ENU)=old_angular_y(NED_EAST)
new_angular_y(NORTH_ENU)=old_angular_x(NED_NORTH)
new_angular_z(UP_ENU)=-old_angular_z(NED_DOWN)

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.

$\endgroup$
1
  • $\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, 2019 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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