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

Linear velocity drift robot_localization with imu

asked 2015-07-20 09:36:32 -0600

Robocop87 gravatar image

updated 2015-07-20 12:09:56 -0600

Hi all,

I am using robot_localization to fuse odometry and imu measurements. While my robot is standing still, the estimated pose blows up towards the x and/or y direction and the velocity increases steadily. I believe this is because my IMU messages are reporting that there is acceleration in the x-y direction when there is not. The acceleration that is seen on the imu axes are from gravity because on my robot it is impossible to mount the imu perfectly level. The angle is accurately reflected in the orientation.

Odometry message:

header: 
  seq: 180
  stamp: 
    secs: 0
    nsecs: 0
  frame_id: odom
child_frame_id: base_link
pose: 
  pose: 
    position: 
      x: -4.57017288436e-23
      y: -1.37577341871e-27
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
  covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2]

IMU message:

header: 
  seq: 3565
  stamp: 
    secs: 1437400985
    nsecs: 945771932
  frame_id: base_imu_link
orientation: 
  x: 0.0115444314118
  y: 0.0118909824299
  z: 0.0816176668022
  w: 0.996525908899
orientation_covariance: [0.0025, 0.0, 0.0, 0.0, 0.0025, 0.0, 0.0, 0.0, 0.0025]
angular_velocity: 
  x: -0.07
  y: 0.0
  z: -0.0
angular_velocity_covariance: [0.02, 0.0, 0.0, 0.0, 0.02, 0.0, 0.0, 0.0, 0.02]
linear_acceleration: 
  x: -0.210292734375
  y: 0.2711971875
  z: 9.72747539062
linear_acceleration_covariance: [0.04, 0.0, 0.0, 0.0, 0.04, 0.0, 0.0, 0.0, 0.04]

robot_localization message

header: 
  seq: 14858
  stamp: 
    secs: 1437401408
    nsecs: 104844999
  frame_id: odom
child_frame_id: base_link
pose: 
  pose: 
    position: 
      x: 752.873872865
      y: -960.277044656
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.0129782931114
      w: 0.999915778407
  covariance: [1235363.2798552709, 0.09966583512707781, 0.0, 0.0, 0.0, 0.00012219044159253388, 0.09966583492106752, 1235363.2253877113, 0.0, 0.0, 0.0, 8.345895540980487e-05, 0.0, 0.0, 4.997912991703062e-07, -1.6226536599895273e-14, -1.1710583642991047e-14, 0.0, 0.0, 0.0, -1.6226536599895264e-14, 4.995829440611683e-07, -9.105011207999492e-19, 0.0, 0.0, 0.0, -1.1710583642991045e-14, -9.10501120799949e-19, 4.995829440617729e-07, 0.0, 0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-24 16:39:07 -0600

Tom Moore gravatar image

Two things:

  1. If you fuse an IMU by itself, then yes, the linear accelerations will cause the velocity and pose estimates to move rapidly. You need another velocity or pose reference.
  2. Your odometry message time stamps are 0. Time stamps matter to robot_localization, as they are needed to look up transforms in the tf tree. Your odometry messages are probably being ignored.
edit flag offensive delete link more

Comments

I'm sorry, I just saw this! I didn't realize the time stamp on the odometry was a problem, but that makes sense. I would have expected robot_localization to complain on the diagnostic topic if it was throwing out messages. I will test this soon.

Robocop87 gravatar image Robocop87  ( 2015-08-06 07:58:11 -0600 )edit
1
Tom Moore gravatar image Tom Moore  ( 2015-08-06 08:29:02 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-20 09:36:32 -0600

Seen: 978 times

Last updated: Jul 24 '15