ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

odom frame keeps moving in GPS robot_localization

asked 2022-12-20 13:51:16 -0600

zrahman gravatar image

I am using two instances of 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. image description

In the image, you can see the map frame is the big axes. odom frame was there too. But as I moves 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
  base_link_frame: base_link
  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
  base_link_frame: base_link
  world_frame: map

  publish_tf: true

navsat_transform node:

navsat_transform:
  frequency: 30
  delay: 3.0
  magnetic_declination_radians: 0.0842
  yaw_offset: -1.57080
  zero_altitude: true
  broadcast_utm_transform: true
  publish_filtered_gps: true
  use_odometry_yaw: false
  wait_for_datum: false
  broadcast_utm_transform_as_parent_frame: false

I am using gazebo husky simulation.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-12-21 08:52:02 -0600

Mike Scheutzow gravatar image
Odom should remain fixed at the initial starting point.

You need to be careful with this idea, because map->odom is allowed to change. Updates to this TF are typically done to correct for drift in odom->base_link.

edit flag offensive delete link more

Comments

Ok, But it is changing even when the robot is not moving.

zrahman gravatar image zrahman  ( 2023-01-01 14:33:03 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2022-12-20 13:51:16 -0600

Seen: 184 times

Last updated: Dec 21 '22