# odom frame keeps moving in ROS GPS robot_localization

I am using two instances of ROS robot_localization package to get the local and global odometry. In the local one, I am fusing IMU and twist messages. It is working fine. But when I use the second instance where map and odom frame both should be fixed points, one of them is moving. I set map as the fixed frame, then odom is moving. Why is that? Odom should remain fixed at the initial starting point. base_link with respect to odom is working fine but since odom is moving, base_link with respect to map is not working.

In the image, you can see the map frame is the big axes. odom frame was there too. But as I move the robot, the odom frame starts moving. The red lines are local odometry and green ones are global odometry.

1st instance:

ekf_se_odom: # Used only for broadcasting odom to base_link transforms
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false

map_frame: map
odom_frame: odom
world_frame: odom


2nd instance:

ekf_se_map:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false

map_frame: map
odom_frame: odom
world_frame: map

publish_tf: true


navsat_node:

navsat_transform:
frequency: 30
delay: 3.0
yaw_offset: -1.57080
zero_altitude: true
publish_filtered_gps: true
use_odometry_yaw: false
wait_for_datum: false


I am using gazebo husky simulation.

• Are you sure, you do not have other nodes running in the background? Using Ctrl + C does stop the stop but sometimes, it runs in the background.
– Dave
Dec 30, 2022 at 11:25