map, odom, robot footprint are not aligned in RViz

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

nemesis gravatar image

Hello,

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" />    
 </joint>

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

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

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

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

costmap_common_params.yaml

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_costmap_params.yaml

global_costmap:
   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

local_costmap_params.yaml

local_costmap:
   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

Comments

Any Updates on this?

Aadi gravatar imageAadi ( 2019-02-25 02:35:42 -0600 )edit