tf problems when fusing IMU & Odometry using robot_localization
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 ...
Can you provide an example message from your IMU and from your odometry? Also you may benefit from reading the
robot_localization
documentation here.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.
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?
Thanks a lot. I have solved this problem.