# Robot localization fusing wheel and visual odometry

Hello. I'm trying to fuse whell and visual odometry in robot_localization package. But I get insufficiently accurate data on output. The robot is lost more strongly, than at use only a wheel odometry. It is especially noticeable that the robot is lost when it approaches very close to the wall. I'm using kinect and rtab_map for visual odometry.

This is my launch file to robot_localization.

<launch> <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">

<remap from="odometry/filtered" to="odom" />

<param name="frequency" value="20"/>

<param name="sensor_timeout" value="0.1"/>

<param name="two_d_mode" value="false"/>
<param name="transform_time_offset" value="0.0"/>

<param name="odom_frame" value="odom"/>
<param name="world_frame" value="odom"/>

<param name="odom0" value="odom_base"/>
<param name="odom1" value="odom_visual"/>

<rosparam param="odom0_config">[true, true, false,
false, false, true,
false, false, false,
false, false, true,
false, false, false]</rosparam>

<rosparam param="odom1_config">[false, false, false,
false, false, false,
true, true, false,
false, false, false,
false, false, false]</rosparam>

<param name="odom0_differential" value="false"/>
<param name="odom1_differential" value="false"/>

<param name="odom0_relative" value="false"/>
<param name="odom1_relative" value="false"/>

<param name="odom0_queue_size" value="10"/>

<param name="debug"           value="false"/>
<param name="debug_out_file"  value="debug_ukf_localization.txt"/>

<param name="alpha" value="0.001"/>
<param name="kappa" value="0"/>
<param name="beta" value="2"/>
</node>


</launch>

What is right way to fuse whell and visual odoms? How should I set <rosparam param="odom0_config"> and <rosparam param="odom1_config">?

edit retag close merge delete

Sort by » oldest newest most voted

The reasons for you problem might be:

1- you need to adjust the process noise covariance from the parameter file because the model is not describing the kinematics accurately.

2- the covariances you are using for each odometry is not precise and therefore the ekf can diverge.

As for how you should set the config parameter of each odometry, this depends on the output of these odometries.

i understand from your launch file is that your wheel odometry gives the pose [x, y, yaw] and also yaw angular velocity. if this is not true adjust your file.

The same for visual odometry, in your file you configured it to give you [vx, vy] if this is not correct adjust your file given that the config parameter is arranged as follows:

[x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az]

more

My high-level recommendation:

Trust wheel odometry for linear velocity, trust monocular odometry for angular velocity, feed these to EKF and compute pose.

Reasoning:

It would make a lot more sense to feed rate (velocity) measurements from wheel encoders and visual odometry into your EKF and let the EKF fuse the rate measurements to compute pose. If you can provide good values for noise covariances for these various rate measurements it is possible to get good pose information. Obviously, tuning the process noise is a time consuming process.

Monocular visual odometry is quite good at measuring rotation but has no idea of scale of motion so you should NOT use its pose estimate or linear velocity estimate, only its angular velocity estimate.

Stereo visual odometry can determine the scale of motion but is susceptible to high noise, so you CAN use its linear velocity and angular velocity measurements but be careful of its linear velocity measurements.

Wheel odometry is good for providing linear and angular velocities but it can be susceptible to wheel slippage. A lot of wheel slip leads to bad odometry but my guess is that if your slip is nominal (regular concrete floor or road) it is best to trust this the most, especially for linear motion.

How to make it better:

Get an IMU as well.

more