ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 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_drives node
  3. Most importantly - mount the IMU upside down. The cable must point forward, the label - down.

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).

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_drives imu_drivers node
  3. Most importantly - mount the IMU upside down. The orientation is as follows: the cable must point forward, the label - down.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).

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).