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

So the problem was in the Mag calibration. I redid the calibration procedure while the IMU was mounted on the Turtlebot. I picked up the Turtlebot and moved it around in all directions as in the instructions. The "Ellipsoid Center" values came out significantly different:

Standalone Calibration Results:

const float magn_ellipsoid_center[3] = {138.402, -65.8241, -12.1968};
const float magn_ellipsoid_transform[3][3] = {{0.847013, -0.00538074, 0.00712010}, {-0.00538074, 0.865221, 0.00961725}, {0.00712010, 0.00961725, 0.999017}}

Results when mounted on the Turtlebot:

const float magn_ellipsoid_center[3] = {135.215, 4.24598, 5.24594};
const float magn_ellipsoid_transform[3][3] = {{0.820361, -0.0188837, 0.0166510}, {-0.0188837, 0.831140, 0.0388830}, {0.0166510, 0.0388830, 0.990194}};

Notice the changes in the Y and Z values of the Ellipsoid Center.

After this, the combined results of Wheels + IMU odometry were much better than wheels-only.

Other things to note:

  • Experiment with positioning the IMU to minimize interference.

  • Verify the ellipsoid center values -- the IMU node prints out the values on startup -- at least twice they were not correct (missing one digit). Not sure why that happened.

  • The instructions say to modify the Arduino firmware with these values. I found that it was sufficient to change the parameters in the launch file -- no need to modify the firmware.

So the problem was in the Mag calibration. I redid the calibration procedure while the IMU was mounted on the Turtlebot. I picked up the Turtlebot and moved it around in all directions as in the instructions. The "Ellipsoid Center" values came out significantly different:

Standalone Calibration Results:

const float magn_ellipsoid_center[3] = {138.402, -65.8241, -12.1968};
const float magn_ellipsoid_transform[3][3] = {{0.847013, -0.00538074, 0.00712010}, {-0.00538074, 0.865221, 0.00961725}, {0.00712010, 0.00961725, 0.999017}}

Results when mounted on the Turtlebot:

const float magn_ellipsoid_center[3] = {135.215, 4.24598, 5.24594};
const float magn_ellipsoid_transform[3][3] = {{0.820361, -0.0188837, 0.0166510}, {-0.0188837, 0.831140, 0.0388830}, {0.0166510, 0.0388830, 0.990194}};

Notice the changes in the Y and Z values of the Ellipsoid Center.

After this, the combined results of Wheels + IMU odometry were much better than wheels-only.

Other things to note:

  • Experiment with positioning the IMU to minimize interference.

  • Verify the ellipsoid center values -- the IMU node prints out the values on startup -- at least twice they were not correct (missing one digit). Not sure why that happened.

  • The instructions say to modify the Arduino firmware with these values. I found that it was sufficient to change the parameters in the launch file (my_razor.yaml) -- no need to modify the firmware.

So the problem was in the Mag calibration. I redid the calibration procedure while the IMU was mounted on the Turtlebot. I picked up the Turtlebot and moved it around in all directions as in the instructions. The "Ellipsoid Center" values came out significantly different:

Standalone Calibration Results:

const float magn_ellipsoid_center[3] = {138.402, -65.8241, -12.1968};
const float magn_ellipsoid_transform[3][3] = {{0.847013, -0.00538074, 0.00712010}, {-0.00538074, 0.865221, 0.00961725}, {0.00712010, 0.00961725, 0.999017}}

Results when mounted on the Turtlebot:

const float magn_ellipsoid_center[3] = {135.215, 4.24598, 5.24594};
const float magn_ellipsoid_transform[3][3] = {{0.820361, -0.0188837, 0.0166510}, {-0.0188837, 0.831140, 0.0388830}, {0.0166510, 0.0388830, 0.990194}};

Notice the changes in the Y and Z values of the Ellipsoid Center.

After this, the combined results of Wheels + IMU odometry were much better than wheels-only.

Other things to note:

  • Experiment with positioning the IMU to minimize interference.

  • Verify the ellipsoid center values -- the IMU node prints out the values on startup -- at least twice they were not correct (missing one digit). Not sure why that happened.

  • The instructions say to modify the Arduino firmware with these values. I found that it was sufficient to change the parameters in the launch file (my_razor.yaml) -- no need to modify the firmware.

Edited to add: I had noted above that the ellipsoid_center or ellipsoid_transform values were getting corrupted on the readback from the IMU (after calibration configuration was sent to the IMU). Suspecting that it may be a serial line buffer overflow type of problem I added a few rospy.sleep(1) while writing these values from imu_node.py. Happy to report that that seems to have done the trick. The read-back values are no longer corrupted. Most definitely a hack, and perhaps specific to my particular IMU but it works!