Ask Your Question
0

tf problems when fusing IMU & Odometry using robot_localization

asked 2018-05-28 03:03:37 -0500

Herman Zh gravatar image

updated 2018-05-28 07:40:14 -0500

Recently, I tried to fuse IMU & Odometry using robot_localization. I am new with ROS. So I googled the how to use robot_localization and I found an answer in ROS answer. Like the answer, I set my parameters. But when I used rviz to visualize the output data, nothing was showed in rviz. At the same time, some warnings appeared in terminal. They were :

This is my parameter yaml file:

frequency: 30
two_d_mode: true
publish_tf: true
map_frame: map
base_link_frame: base_link
world_frame: odom
odom0: odom
odom0_config: [false,  false,  false,
           false, false, false,
           true, true, false,
           false, false, true,
           false, false, false]
odom0_differential: true
odom0_relative: false
imu0: imu
imu0_config: [false, false, false,
          false,  false,  true,
          false, false, false,
          false,  false,  true,
          false,  false,  false]
imu0_differential: false
imu0_relative: true

Here is an IMU data example:

header: 
  seq: 216
  stamp: 
    secs: 1526611260
    nsecs: 604129076
  frame_id: "odom"
orientation: 
  x: 0.019081002541
  y: 0.0176010276701
  z: 0.756566256054
  w: 0.653401575884
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity: 
  x: 0.0262750904177
  y: 0.105781526009
  z: 0.611078396295
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration: 
  x: -66.4270420776
  y: 26.5278944317
  z: 23.6191084812
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

This is the odometry:

header: 
  seq: 57
  stamp: 
    secs: 1526611264
    nsecs: 144042968
  frame_id: "odom"
child_frame_id: "vehicle"
pose: 
  pose: 
    position: 
      x: -2.50920810798
      y: 3.50529054226
      z: -0.0704833107515
    orientation: 
      x: -0.0269732153319
      y: 0.02584826047
      z: 0.805597783985
      w: -0.591283792712
  covariance: [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.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist: 
  twist: 
    linear: 
      x: 2.16608598109
      y: 0.144826565955
      z: 0.182436869433
    angular: 
      x: -0.0323011415579
      y: -0.0194535850063
      z: 0.707899531922
  covariance: [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.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

Platform: Ubuntu 16.04, ROS kinetic 1.12.12

I googled the warnings and it seemed that they were the exception of tf. I have not learned how to us tf yet. I was wondering if I need to write a tf transform node to process the tranform and what is wrong in my parameters. By the way, is it ... (more)

edit retag flag offensive close merge delete

Comments

Can you provide an example message from your IMU and from your odometry? Also you may benefit from reading the robot_localization documentation here.

stevejp gravatar imagestevejp ( 2018-05-28 07:32:51 -0500 )edit

Thanks for your comment. I have re-edited my question and provided two data example. I will read the documentation carefully. Thanks for your recommendation.

Herman Zh gravatar imageHerman Zh ( 2018-05-28 07:42:34 -0500 )edit

Sorry, I am new with ROS. Do you mean that my IMU should report the vehicle base_link, and its frame_id should be base_link? Could you give me more details about it? And, how to know my IMU units is wrong?

Herman Zh gravatar imageHerman Zh ( 2018-05-28 09:12:05 -0500 )edit

Thanks a lot. I have solved this problem.

Herman Zh gravatar imageHerman Zh ( 2018-05-29 08:59:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-05-28 08:56:49 -0500

stevejp gravatar image

updated 2018-05-28 08:58:04 -0500

Thanks for updating. It looks like your IMU is reporting orientation of the odom frame - typically the IMU reports orientation of a frame which is fixed to the vehicle (i.e., imu_link, base_link). Also looks like the units on your IMU are incorrect.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-28 03:03:37 -0500

Seen: 104 times

Last updated: May 28 '18