map, odom, robot footprint are not aligned in RViz

asked 2017-12-05 17:28:31 -0500

nemesis gravatar image


I have a custom robot which I am trying to localize using amcl. I am using a map from clearpath. I face a very weird issue with the robot when simulating it in rviz.

  • The robot model "cuts across" the map.
  • The "odom" frame is underneath the "map" and the "robot_footprint" frames.
  • At times the "robot_footprint" frame fluctuates in respect to the "odom" or "map" frames.

Here are the images to denote the above (please ignore my awful paint skills) image description

As you can see,

  1. shows "odom" underneath "map" frame.
  2. shows "robot_footprint" and "map" on the same plane (plane is the global costmap).
  3. shows the robot model "cutting" across the map.
  4. shows "robot_footprint" fluctuating/flickering with respect to "map"/"odom".

I am not entirely sure how to fix this.

The above are when "map" is selected as "Fixed Frame" in "Global Options".

Here are some configuration details -

Part of URDF

<link name="robot_footprint"></link>
 <joint name="robot_footprint_joint" type="fixed">
 <origin xyz="0 0 0" rpy="0 0 0" />
 <parent link="robot_footprint"/>
 <child link="chassis" />    

 <link name='chassis'>
 <pose>0 0 0.1 0 0 0</pose>

   <mass value="15.0"/>
   <origin xyz="0.0 0 0.1" rpy=" 0 0 0"/>
       ixx="0.1" ixy="0" ixz="0"
       iyy="0.1" iyz="0"

 <collision name='collision'>
     <box size=".4 .2 .1"/>

 <visual name='chassis_visual'>
   <origin xyz="0 0 0" rpy=" 0 0 0"/>
     <box size=".4 .2 .1"/>


map_type: costmap

origin_z: 0.0 
z_resolution: 1
z_voxels: 2

obstacle_range: 2.5 
raytrace_range: 3.0 

publish_voxel_map: false
transform_tolerance: 0.5 
meter_scoring: true

robot_radius: 0.3 
inflation_radius: .6

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: hokuyo, data_type: LaserScan, topic: /robot/laser/scan, marking: true, clearing: true}


   global_frame: map 
   robot_base_frame: chassis
   update_frequency: 10.0
   publish_frequency: 5.0 
   width: 40.0
   height: 40.0
   resolution: 0.05
   origin_x: -20.0
   origin_y: -20.0
   static_map: true
   rolling_window: false


   global_frame: map 
   robot_base_frame: chassis
   update_frequency: 10.0
   publish_frequency: 5.0 
   width: 10.0
   height: 10.0
   resolution: 0.05
   static_map: false
   rolling_window: true

Any help is appreciated, thank you!

edit retag flag offensive close merge delete


Any Updates on this?

Aadi gravatar image Aadi  ( 2019-02-25 02:35:42 -0500 )edit