robot_localization: a very simple usecase not working?
Hi, I'm trying to use robot_localization to fuse two localization sources: amcl + feature-based localization. But just starting with a very simple case, namely filtering amcl input without any fusion, works very bad for the rotation. It's clear to me that either I'm misunderstanding how robot_localization works, or I did a very stupid mistake on the configuration. Here's my launch file:
<launch>
<node ns="absolute" pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true" respawn="true">
<!-- ======== STANDARD PARAMETERS ======== -->
<param name="frequency" value="30"/>
<param name="sensor_timeout" value="0.5"/>
<param name="two_d_mode" value="true"/>
<param name="map_frame" value="map"/>
<param name="odom_frame" value="odom"/>
<param name="base_link_frame" value="base_footprint"/>
<param name="world_frame" value="map"/>
<param name="transform_time_offset" value="0.0"/>
<param name="pose0" value="/amcl_pose"/>
<!-- AMCL estimates X, Y and yaw against a known map, so use those absolute measures -->
<rosparam param="pose0_config">[true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="pose0_differential" value="false"/>
<param name="pose0_relative" value="false"/>
<param name="print_diagnostics" value="true"/>
<!-- ======== ADVANCED PARAMETERS ======== -->
<param name="pose0_queue_size" value="1"/>
<rosparam param="process_noise_covariance">[0.05, 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.05, 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.06, 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.03, 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.03, 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.00, 0.06, 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.00, 0.0, 0.025, 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.00, 0.0, 0.0, 0.025, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.04, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.00, 0.0, 0.0 ...
have you turned off the
amcl
tf_broadcast (Set this to false to prevent amcl from publishing the transform between the global frame and the odometry frame)?I am having the same issues, if I figure something out, I'll let you know.
Hi, yes, duplicated tf is not the problem. In fact, I'm getting better results tweaking the process_noise_covariance and increasing the input odom messages covariance
thanks for the feeback. I am tweaking the amcl code now, I noticed that it was publishing at a very low rate and I am forcing it to publish the pose every loop now, even if amcl the filter has not updated. at
amcl_node.cpp
line 1095, I have this now:bool force_publication = true;
Does that help EKF localization? Think you will keep publishing an outdated pose in between filter updates...
you are right, that is not helping much. I rolled back from that change.
Hi I also tested the node with a single absolute pose source first. However, if I set pose0_differential and pose0_relative to false, I couldn't get any output. I can get output while pose0_differential is true, and it starts from 0, which is not I wanted.
I also tried your launch file, and had the same problem. Do you have any suggestion to get the node outputting filtered absolute values? Thanks.