Hi, I am trying to use robot localization to fuse the data from an XSense IMU and Odometry Source (Pioneer). The output is not what i expect actually. The resulting odometry looks similar (almost exact) to the odometry of the pioneer? So the filter is not improving or at least changing the result?
This is my launch file:
<param name="frequency" value="30"/>
<param name="sensor_timeout" value="0.1"/>
<param name="base_link_frame" value="base_footprint"/>
<param name="two_d_mode" value="true"/>
<param name="imu0" value="imu/data"/>
<rosparam param="imu0_config">[false, false, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="imu0_differential" value="true"/>
<param name="imu0_remove_gravitational_acceleration" value="false"/>
<param name="odom0" value="/odom/fixed_wheel"/>
<rosparam param="odom0_config">[true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="odom0_relative" value="true"/>
<param name="imu0_relative" value="true"/>
Here is an sample bagfile together with robot localization: https://www.dropbox.com/s/kalrug9s48j5w3x/odom_imu_fuse.bag?dl=0
Topic: /imu/data == xsense imu data
Topic: /odom/fixed_wheel == pioneer improved odometry (by hand added covariances)
Topic: /odom/ukf == current results of robot localization
Topic: /scan/sick == laser scanner for reference
Topic: /tf
Topic: /tf_static
Here is the same bagfile without robot localization: https://www.dropbox.com/s/01xtvgmv7gchb63/odom_imu_unfused.bag?dl=0 --- Update ---
I added this fixed odometry covariance:
odom.pose.covariance = boost::assign::list_of(1e-2) (0) (0) (0) (0) (0)
(0) (1e-2) (0) (0) (0) (0)
(0) (0) (1e6) (0) (0) (0)
(0) (0) (0) (1e6) (0) (0)
(0) (0) (0) (0) (1e6) (0)
(0) (0) (0) (0) (0) (1e-3) ;
Maybe i am missing something obvious? Thanks in advance!
--- Update ---
I tried some different covariance matrices but nothing changed but when i changed my launch file like so:
<param name="imu0_differential" value="true"/>
<param name="odom0_differential" value="true"/>
then i got following result: image its an image, green is the wheel odometry and red the ukf result and blue is the ground truth (i know, really bad drawn^^)
What i do not understand is why the imu is making the result worse? This data is captures outside on a sidewalk, could this be a problem? I am pretty sure that the imu is directed in the right direction but it looks weird...
-- Update --
Here is the sample output of each source, first odometry, then imu:
header:
seq: 4343
stamp:
secs: 1464844455
nsecs: 543424495
frame_id: odom
child_frame_id: ''
pose:
pose:
position:
x: -68.2792701104
y: 122.427959131
z: 0.0
orientation:
x: 0.0
y: -0.0
z: -0.629156547298
w: -0.777278610919
covariance: [0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001]
twist:
twist:
linear:
x: 0.72982
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.01071
covariance: [0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001]
now imu:
header:
seq: 107424
stamp:
secs: 1464844843
nsecs: 499480009
frame_id: imu
orientation:
x: -0.0360126234591
y: -0.000914743170142
z: -0.993979632854
w: 0.10347366333
orientation_covariance: [0.017453292519943295, 0.0, 0.0, 0.0, 0.017453292519943295, 0.0, 0.0, 0.0, 0.15707963267948966]
angular_velocity:
x: 0.0237344596535
y: -0.0165882073343
z: -0.000813889899291
angular_velocity_covariance: [0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824]
linear_acceleration:
x: 0.847484827042
y: 0.130491986871
z: 10.2731733322
linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004]
Originally posted by tinokl on ROS Answers with karma: 13 on 2016-06-06
Post score: 1
Original comments
Comment by chwimmer on 2016-06-06:
so you set the covariances of the Odometry by hand? How you do that. Are you actually calculating them or set them to a static value?
Comment by tinokl on 2016-06-06:
for the odometry i set the covariance to a static value, the imu was already publishing a covariance matrix
Comment by chwimmer on 2016-06-06:
I think thats the main problem. What values did you choose? When you got small values in the covariancematrix of the odometry and high values in the imu covariancemartrix the robot_localisation will "trust" the odometry data much more than the imu data und so the imu data has almost no influence.
Comment by tinokl on 2016-06-06:
i added the covariance matrix to the question, i'll try some larger values and see how it performs
Comment by Tom Moore on 2016-06-07:
Please post a sample message from each input. I realize there's a bag, but it's often enough to just see the raw data. See my answer for more information, though.