0
$\begingroup$

Rosanswers logo

I've seen slightly similar questions regarding this node before (though I'm having trouble finding them now), but I wanted to put all of my findings in one place so I can hopefully get a definitive answer.

REP-103 states that the coordinate frames should be right-handed. By default, the 3DM-GX2 is right-handed, but is upside-down (with Z pointing into the ground), and so, according to the package's page,

The orientation matrix is the transpose of the orientation matrix returned by the hardware, rotated 180 degrees around the y axis. This corresponds to a transformation from the IMU frame to the world frame, with the z axis point up.

This causes the absolute orientation measurements to increase in the correct directions, but:

  1. When I expect the IMU to read 0 heading (at magnetic north), it reads pi.
  2. When I expect the IMU to read 0 roll (laying flat on a surface, with the logo facing up), it reads pi.
  3. Rotating the sensor counter-clockwise (i.e., in the positive direction) causes the yaw angle to increase correctly, but the yaw velocity is reported as negative.
  4. Pitching the sensor down (i.e., with the serial port moving towards the floor) causes the absolute pitch angle to increase correctly, but the pitch velocity is reported as negative.
  5. When the sensor is flat on a table (as in 2 above), the yaw angle increases when I turn counter-clockwise, indicating that the Z-axis is meant to point up, thus agreeing with the wiki. In that case, the measured linear acceleration, which should be in the direction opposite the gravity force vector (i.e., parallel to the normal force vector), should be positive. It is negative.
  6. If I assume the X-axis projects directly out the front of the sensor (through the serial port), then positive rotation would point the Y axis up away from the ground. In that configuration, the Y linear acceleration should also be positive. It is negative.

My questions are:

(A) Has anyone else had these issues, or is there something wrong with my sensor (or me!)?

(B) If I'm not the only one, is this working as intended, or are these bugs?

(C) Does the node attempt to correct the direction of angular increase only? In other words, by default, the sensor's axes have Z down and Y projecting to the right. This is still right-handed, but in order to get the Z-axis up and remain right-handed, all we'd have to do is invert the signs of yaw, yaw velocity, pitch, pitch velocity, Z acceleration, and Y acceleration as read straight from the sensor.

(D) Would it be possible to add a flag to the node that does everything in (C) instead of what's being done in the package's description excerpt above? I'm happy to add an issue to the repo and submit a PR against it if others would find it useful and the authors would want it that way.


Originally posted by Tom Moore on ROS Answers with karma: 13689 on 2014-06-03

Post score: 3


Original comments

Comment by Porti77 on 2015-03-04:
I have the orientation quaternion, how can I transform?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It sounds like the coordinate frames of the hardware do not match.

This is the reference diagram from the ROS wiki, it's a little non-intuitive, but it is what it is.

http://wiki.ros.org/microstrain_3dmgx2_imu

image description


Originally posted by Chad Rockey with karma: 4541 on 2014-06-04

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Tom Moore on 2014-06-04:
The diagram on the wiki page actually matches what the IMU documentation gives:

http://files.microstrain.com/mechanical-prints/3dm-gx2-dimensions-rotations-axes.pdf

However, that's the IMU's factory settings. The ROS node is applying a transform to flip Z and Y, so the diagram doesn't match.

Comment by Chad Rockey on 2014-06-04:
It sounds like you have a newer model. I can confirm that the one pictured and the ones in the PR2 function. (They were not magnetic, however).

$\endgroup$

Your Answer

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

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