robot_localization with cartographer and amcl
I am using cartographer_ros along with amcl and an imu and wheel odometry for localization. Robot_localization seems ideal for this. I modified the sources for cartographer and amcl so that they publish poses and do not broadcast transforms. I used the following robot_localization setup and it seems to be working well, but I am not sure it is entirely correct. If someone would be kind enough to look it over, I would sure appreciate that. I am particularly interested to know whether I set the frame ID and child frames correctly for the inputs from amcl and cartographer (frame ID = map, child ID = base_footprint). I am also interested to know if the second instance should be fed any of the continuous data. Right now it just gets data from amcl and cartographer.
robot_localization ukf instance 1, continuous inputs, 2D mode is true, neither of the inputs is set to differential.
<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="odom"/>
odom0 is from the wheel encoders, reporting vx and vYaw (vy = 0), 2D mode, with frame id= odom, child frame is base_footprint
<rosparam param="odom0_config">[false, false, false, <!-- x, y, z position -->
false, false, false, <!-- roll, pitch, yaw angles -->
true, true, false, <!-- vx, vy, vz -->
false, false, true, <!--roll, pitch, yaw velocities-->
false, false, false]</rosparam>
imu0 is from the IMU, reporting vYaw, frame ID is imu_link
<rosparam param="imu0_config">
[false, false, false,
true, true, true, <!-- these are absolutes that are calibrated, not just integrated velocities -->
false, false, false,
true, true, true, <!-- roll, pitch, yaw velocities -->
true, false, false]</rosparam>
robot_localization ukf instance 2 brings in amcl and cartographer (and eventually GPS)
<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"/>
pose0 is from amcl, with a frame ID = map, it is set to differential.
<rosparam param="pose0_config">
[true, true, false, <!-- x, y, z position -->
true, true, true, <!-- roll, pitch, yaw angles -->
false, false, false, <!-- vx, vy, vz -->
false, false, false,
false, false, false]</rosparam>
odom0 is from cartographer, the frame ID is map, the child is base_footprint
<rosparam param="odom0_config">
[true, true, false,
true, true, false,
false, false, false,
false, false, true,
false, false, false]</rosparam>
I'm not sure you can fuse in AMCL like that, I think that creates a negative feedback loop but I could be wrong. I'd love to hear your experiences trying to. My own have generally failed from a negative feedback style estimate
So far it is working really well. I changed the differentials to make AMCL "false" and cartographer "true" because the cartographer jumps were disruptive. I am using the covariances supplied by AMCL but need to find a good way to estimate covariance for cartographer.
Hi dan, I don't know if this is the right place to ask you this. But you said you modified Cartographer source code for it not to publish the map to odom tf. I would also like to implement this but, so far, I did not manage to find a way. If by any chance you see this comment, could you please give me some hints on how to achieve this ? Thanks a lot.