Ask Your Question

microstrain IMU in PR2

asked 2013-06-29 18:23:32 -0500

ChickenSoup gravatar image

updated 2014-11-22 17:05:40 -0500

ngrennan gravatar image


Can anyone tell me in which orientation (where the sensor's x,y,z directions are) the microstrain IMU is attached to PR2?

The reason I am asking this because, I am little confused with transforming the data coming from the IMU.

i) In it says that "The orientation matrix is the transpose of the orientation matrix returned by the hardware, rotated 180 degrees around the y axis." and I could find this in the code:

tf::Quaternion quat;
tf::Matrix3x3(orientation[0], orientation[3], orientation[6],
     orientation[1], orientation[4], orientation[7],
     orientation[2], orientation[5], orientation[8])).getRotation(quat);

tf::quaternionTFToMsg(quat, data.orientation);
  • I actually don't quite get the logic behind this. I just feel North-East-Down (NED) convention can be converted East-North-Up (ENU) convention by just rotating PI around X axis.

ii) In the PR2 URDF I see

<!-- imu -->
<xacro:microstrain_3dmgx2_imu_v0 name="imu" parent="${name}" imu_topic="torso_lift_imu/data" update_rate="100.0" stdev="0.00017" >
    <origin xyz="-0.02977 -0.1497 0.164" rpy="0 ${M_PI} 0" />
  • the reason for rpy="0 ${M_PI} 0" will be clear if I know the actual IMU orientation in PR2

Thank you

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-01 04:43:03 -0500

Here is a mechanical drawing that shows the 3 axes of rotation on the 3DM-GX2.

edit flag offensive delete link more


Thank you for the drawing. But, still it does not answer my question. I need information specific to PR2

ChickenSoup gravatar image ChickenSoup  ( 2013-07-01 15:47:47 -0500 )edit

The best definition of where the IMU is mounted is the URDF which you cited.

tfoote gravatar image tfoote  ( 2013-08-12 10:50:03 -0500 )edit

answered 2013-11-12 05:23:45 -0500

autonomy gravatar image

updated 2013-12-12 06:52:36 -0500

Update: my coworker and I learned that this solution is incomplete. While the rotations in RViz are correct, the yaw values are off by 180 degrees (i.e. the robot will point South when the IMU points North). This can be fixed with an addition of 180 degrees to wherever you use the IMU values, but I consider that to be hacky. Just FYI.

This same stinking issue comes up over here every few months. Our current solution, which I think is the final one, is to disregard whatever the PR2 URDF file says. We verified that we get correct robot rotation in Rviz when we do the following:

  1. Remove any rpy rotation values in the URDF file for the IMU link/joint.
  2. Use the original unmodified imu_drivers node
  3. Most importantly - mount the IMU upside down. The orientation is as follows: the cable must point forward, the label - down (take the picture here and flip the IMU around the X-axis)

Hopefully this helps someone else looking for the same problem. The confusion appears to stem from the 3DM-GX2's left-handed coordinate system (their Z-axis points down and Y points to the right, instead of up and left, respectively), and the way the IMU is mounted in the PR2.

So to answer your question - if the PR2's IMU is pitched by 180 degrees (that's what's in the URDF), then I'm guessing their IMU is mounted with the label facing up and the cable facing 'backwards' (towards the back of the robot).

edit flag offensive delete link more


Thanks! @autonomy

ChickenSoup gravatar image ChickenSoup  ( 2013-11-12 18:51:28 -0500 )edit

The GX2 is NED, and right-handed (not left-handed)

paulbovbel gravatar image paulbovbel  ( 2015-01-23 12:24:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-06-29 18:23:32 -0500

Seen: 773 times

Last updated: Dec 12 '13