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

IMU ignored

asked 2015-02-27 03:22:43 -0600

scar gravatar image

updated 2015-03-01 17:19:23 -0600

Thanks again for your feedback, Tom. I fined-tuned the rejection_threshold parameters and now the filter is responsive.

<param name="imu0_pose_rejection_threshold" value="4.0"/>

Also, enabling the 2D mode helped

<param name="two_d_mode" value="true"/>

But still the drift is way too much. After a few seconds of execution the twuist looks like this:

> twist: 
  twist: 
    linear: 
      x: 0.913357125234
      y: 0.430200660862
      z: -7.14791210599e-13
    angular: 
      x: -2.81627680375e-24
      y: 5.93552733918e-24
      z: -0.00848949772664

The IMU must be calibrated and I have to figure out the covariance matrix for the measurements. Is there any ROS package that is particularly suitable for my needs? thanks, marcello

edit retag flag offensive close merge delete

Comments

Sorry, I wasn't clear in my answer. Please post:

  1. Your launch file for ekf_localization_node
  2. Run rostopic echo on each input topic (just the IMU for you, I believe), and copy and paste one message here

You can remove the debug output, or perhaps post a link to it on DropBox.

Tom Moore gravatar image Tom Moore  ( 2015-02-28 08:51:25 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-02-27 08:12:58 -0600

Tom Moore gravatar image

updated 2015-03-01 19:00:08 -0600

I need to add this to the wiki, but in general, it's best to post your launch file, a sample message from each sensor, and if possible, a bag file. In this case, though, the answer is here:

Innovation mahalanobis distance test failed. Squared Mahalanobis is 0.00026296 threshold was: 0.0001 Innovation: [-0.0016803 0.0017509 -0.0021135 ]

You set your rejection threshold too low for this sensor. I'd remove that setting from your launch file until you get everything else working.

EDIT 1 in response to comments and updates:

First, if your only sensor data is an IMU, I would expect your position to drift without bound. You have non-zero linear acceleration values, and those are going to be integrated into velocities, and then integrated again into position. A single IMU is insufficient for a good state estimate.

As far as your statement that the orientation appears to be ignored, try setting all non-orientation variables to false for imu0_config (this only serves to isolate the problem), and try again. If it still doesn't work, change your static transform publisher so it publishes at a faster rate. The last parameter is not frequency in Hz, it's period in ms, so with a value of 100, you're only publishing that transform at 10 Hz. If it still doesn't work, post the debug file to the DropBox location.

EDIT 2 in response to updated question: glad to hear it's working better. However, I should point out that even if you calibrate your IMU, you will most certainly get false motion resulting from your accelerometers. You need another velocity or position measurement to eliminate this effect.

edit flag offensive delete link more

Comments

Thank you, Tom for your prompt reply, next you can see my answer with more details and a link to a shared dropbox folder where you can check the source files. Marcello

scar gravatar image scar  ( 2015-02-28 18:22:35 -0600 )edit

Interesting outcome! This particular IMU I'm using removes the gravitational acceleration on-board. So I set : <param name="imu0_remove_gravitational_acceleration" value="false"/> And now I have the opposite effect. The imu seems drifting unbounded. Besides, the rotation is not effective at all.

scar gravatar image scar  ( 2015-03-01 00:19:44 -0600 )edit
0

answered 2015-02-28 18:52:58 -0600

scar gravatar image

Hi here are more detail about my implementation. In this dropbox folder you can find all source codes I used. Please see imu_launch.launch. the tf tree was generated without launching the tf_broadcaster2 node.

This is the message from my imu:

> header: 
  seq: 101808
  stamp: 
    secs: 1425169130
    nsecs: 265822954
  frame_id: imu_link
orientation: 
  x: 0.0141917338587
  y: -0.0190885799032
  z: -0.761129019373
  w: 0.648164205025
orientation_covariance: [0.01, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.01]
angular_velocity: 
  x: 0.00174532925199
  y: 0.0
  z: 0.010471975512
angular_velocity_covariance: [0.03, 0.0, 0.0, 0.0, 0.03, 0.0, 0.0, 0.0, 0.03]
linear_acceleration: 
  x: -0.14317709
  y: -0.163771055
  z: -0.044129925
linear_acceleration_covariance: [0.06, 0.0, 0.0, 0.0, 0.06, 0.0, 0.0, 0.0, 0.06]
---

and this is the odometry message:

> header: 
  seq: 32733
  stamp: 
    secs: 1425169127
    nsecs: 986912659
  frame_id: odom
child_frame_id: base_link
pose: 
  pose: 
    position: 
      x: 0.0
      y: 0.0
      z: 0.0
    orientation: 
      x: -0.0405862441429
      y: -0.0544590376651
      z: 0.884725386822
      w: 0.46113768
  covariance: [70082709835.63065, -259798211.75413123, -17498417981.253403, 0.0, 0.0, 0.0, -259798211.75396025, 70267513088.67305, 18010724790.448483, 0.0, 0.0, 0.0, -17498417981.253338, 18010724790.448723, 1156883984985.683, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 13.610154849790163, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 13.610154849790163, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 26.775125314374463]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: -0.00113914143655
      y: -0.000434430465949
      z: 0.00835982129424
  covariance: [4333730.030223489, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4333730.030223489, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6500597.178315525, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0030484568884755984, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0030484568884755984, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.004248933364098904]
---
edit flag offensive delete link more

Comments

Please edit the original question rather than adding an answer.

Tom Moore gravatar image Tom Moore  ( 2015-03-01 12:14:49 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-27 03:22:43 -0600

Seen: 665 times

Last updated: Mar 01 '15