robot_localization wont publish map->odom [closed]
I'm trying to fuse gps data with my other sensor data like told in [http://docs.ros.org/melodic/api/robot...].
With this line
<!--Sensorfusion odom->base_link-->
<node if="$(arg use_zed)" pkg="robot_localization" type="ukf_localization_node" name="ukf_se_1" clear_params="false">
<rosparam command="load" file="$(find robot_nav)/params/ukf_template.yaml" />
<remap from="/odometry/filtered" to="/1_odom" />
</node>
robot_localization is able to generate a transform from odom->base_link, but if I try running a second instance like
<!--Sensorfusion map->odom-->
<node if="$(arg use_zed)" pkg="robot_localization" type="ukf_localization_node" name="ukf_se_2" clear_params="false">
<rosparam command="load" file="$(find robot_nav)/params/ukf_template.yaml" />
<param name="world_frame" value="map"/>
<remap from="/odometry/filtered" to="/2_odom" />
</node>
robot_localization won't publish any transform from map->odom.
Note that this is an simplyfied example. Im actually trying to fuse zed, rtabmap (disabled pubslich_tf) and gps odometry in 2 saperate filters and also get no map->base_link transform. I simplyfied to test if robot_localization can publish the transform with inputs which already created a valid transform.
Thank you in advance.
Are you using the same data sources for both the map->odom and odom->base_link filters? I see that you are using the same ukf_template.yaml for both and that this is not the intended use. Reading points 1,2, and 3 in the ukf_template.yaml explain this. From your current setup it looks like you do not account for the difference between discrete and continous measurements. I don't think this is the root of the problem you have (which I can't really figure out with the amount of infomation you gave) but it's probably a good idea to align your setup with the best practice as a place to start.
Can you please provide your actual config? One of those filters needs its
world_frame
to be odom, and the other needs itsworld_frame
to be map.