A more appropriate answer to this issue is that, there is a mismatch in timestamps between when the ekf_localization is making that map->odom transform available and when the package is requesting for the same transform.
This solves the issue : We need to tell robot_localization package to publish the transform T seconds into the future so that the next iteration of fusion can use it where T depends on frequency of the robot_localization package. We used the transform time offset parameter to introduce this offset in the timestamps published by the robot_localization node. The new tf_tree after introducing the offset should reflect this change. In our case :
<?xml version="1.0"?>
<launch>
<arg name="id" default="0"/>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf" output="screen" >
<!-- Frequency of the main run loop. -->
<param name="frequency" value="50"/>
<!-- <param name="sensor_timeout" value="0.1"/> -->
<!-- <param name="transform_timeout" value="0.1"/> -->
<param name="odom_frame" value="base_link_origin"/>
<param name="base_link_frame" value="base_link"/>
<param name="world_frame" value="world"/>
<param name="map_frame" value="world"/>
<param name="two_d_mode" value="false"/>
<param name="print_diagnostics" value="true"/>
<param name="publish_tf" value="true"/>
<param name="transform_time_offset" value="0.05"/>
<remap from="odometry/filtered" to="odometry/filtered"/>
<!-- If the odometry provides both position and linear velocity, fuse the linear velocity.If the odometry provides both orientation angular velocity, fuse the orientation. -->
<param name="odom0" value="tracker_odom"/>
<rosparam param="odom0_config">[true, true,true, <!-- x, y, z position -->
false, false, true, <!-- roll, pitch, yaw angles-->
true, true, true, <!-- x/y/z velocity -->
true, true, true, <!-- roll/pitch/yaw velocity -->
false, false, false]</rosparam> <!-- Acceleration -->
<param name="odom0_differential" value="false"/>
<param name="odom0_relative" value="false"/>
<param name="odom1" value="jv_pose_new"/>
<rosparam param="odom1_config">[true, true, true,
false, true, true,
false, false, false,
false, false, false,
false, false, false]</rosparam>
<param name="odom1_differential" value="false"/>
<param name="odom1_relative" value="false"/>
<rosparam param="process_noise_covariance">[0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0 ...
(more)
Can you post your TF tree?