0
$\begingroup$

Rosanswers logo

Hello,

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 http://www.ros.org/wiki/microstrain_3dmgx2_imu 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(-1,0,0,
     0,1,0,
     0,0,-1)*
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" />
</xacro:microstrain_3dmgx2_imu_v0>
  • the reason for rpy="0 ${M_PI} 0" will be clear if I know the actual IMU orientation in PR2

Thank you


Originally posted by ChickenSoup on ROS Answers with karma: 387 on 2013-06-29

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Here is a mechanical drawing that shows the 3 axes of rotation on the 3DM-GX2. http://files.microstrain.com/mechanical-prints/3dm-gx2-dimensions-rotations-axes.pdf


Originally posted by MicroStrain Support with karma: 76 on 2013-07-01

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by ChickenSoup on 2013-07-01:
Thank you for the drawing. But, still it does not answer my question. I need information specific to PR2

Comment by tfoote on 2013-08-12:
The best definition of where the IMU is mounted is the URDF which you cited.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by autonomy with karma: 435 on 2013-11-12

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by ChickenSoup on 2013-11-12:
Thanks! @autonomy

Comment by paulbovbel on 2015-01-23:
The GX2 is NED, and right-handed (not left-handed)

$\endgroup$

Your Answer

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