Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Clearing costmap to unstuck robot - Robot oscillates


I am trying to use the ROS navigation stack on kinetic with a real robot. Sometimes everything works just fine, but I get this warning quite often: Then my robot oscillates for a while and switches to rotate recovery behavior:

I have already tried out many, many different combinations of parameters, but haven't had any luck yet. According to this ROS answers question I've doubled the inflation_radius, halved the footprint and reversed pdist_scale and gdist_scale. But my issue remains.

What parameter tricks could help me to solve this issue?

Here are my launch and yaml files: navigation.launch: <launch>

  <node pkg="map_server" type="map_server" name="map_server" args="$(find pem_robot_mobile_base)/map/my_map.yaml"/>
  <node pkg="amcl" type="amcl" name="amcl">
    <param name="use_map_topic"             value="true"/>
    <!-- Publish scans from best pose at a max of 10 Hz -->
    <param name="odom_model_type"           value="diff"/>
    <param name="odom_alpha5"               value="0.1"/>
    <param name="gui_publish_rate"          value="10.0"/>
    <param name="laser_max_beams"           value="60"/>
    <param name="laser_max_range"           value="12.0"/>
    <param name="min_particles"             value="500"/>
    <param name="max_particles"             value="2000"/>
    <param name="kld_err"                   value="0.05"/>
    <param name="kld_z"                     value="0.99"/>
    <param name="odom_alpha1"               value="0.2"/>
    <param name="odom_alpha2"               value="0.2"/>
    <!-- translation std dev, m -->
    <param name="odom_alpha3"               value="0.2"/>
    <param name="odom_alpha4"               value="0.2"/>
    <param name="laser_z_hit"               value="0.5"/>
    <param name="laser_z_short"             value="0.05"/>
    <param name="laser_z_max"               value="0.05"/>
    <param name="laser_z_rand"              value="0.5"/>
    <param name="laser_sigma_hit"           value="0.2"/>
    <param name="laser_lambda_short"        value="0.1"/>
    <param name="laser_model_type"          value="likelihood_field"/>
    <!-- <param name="laser_model_type" value="beam"/> -->
    <param name="laser_likelihood_max_dist" value="2.0"/>
    <param name="update_min_d"              value="0.25"/>
    <param name="update_min_a"              value="0.2"/>
    <param name="odom_frame_id"             value="odom"/>
    <param name="base_frame_id"             value="base_footprint"/>
    <param name="resample_interval"         value="1"/>
    <!-- Increase tolerance because the computer can get quite busy -->
    <param name="transform_tolerance"       value="1.0"/>
    <param name="recovery_alpha_slow"       value="0.0"/>
    <param name="recovery_alpha_fast"       value="0.0"/>
    <param name="initial_pose_x"            value="0.0"/>
    <param name="initial_pose_y"            value="0.0"/>
    <param name="initial_pose_a"            value="0.0"/>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" 
        output="screen" launch-prefix="$(find pem_robot_mobile_base)/scripts/">
    <rosparam file="$(find pem_robot_mobile_base)/config/costmap_common_params.yaml"     command="load" ns="global_costmap" />
    <rosparam file="$(find pem_robot_mobile_base)/config/costmap_common_params.yaml"     command="load" ns="local_costmap" />
    <rosparam file="$(find pem_robot_mobile_base)/config/local_costmap_params.yaml"      command="load" />
    <rosparam file="$(find pem_robot_mobile_base)/config/global_costmap_params.yaml"     command="load" />
    <rosparam file="$(find pem_robot_mobile_base)/config/base_local_planner_params.yaml" command="load" />

  <arg name="command_args" value="-d $(find pem_robot_mobile_base)/config/navigation.rviz" />

  <node pkg="rviz" type="rviz" respawn="false" name="rviz"
        args="$(arg command_args)" output="screen">



obstacle_range: 2.5
raytrace_range: 3.0
# value measured on from rviz (robot footprint is a triangle)
#footprint: [[0.60, 0.00], [-0.30, 0.50], [-0.30, -0.50]]
footprint: [[0.30, 0.00], [-0.15, 0.25], [-0.15, -0.25]]
#robot_radius: ir_of_robot
inflation_radius: 1.0
#inflation_radius: 0.55

observation_sources: mobile_base/back laser_scan_sensor_front

laser_scan_sensor_front: {sensor_frame: laser_front, data_type: LaserScan, topic: scan, marking: true, clearing: true}
mobile_base/back:  {sensor_frame: laser_back,  data_type: LaserScan, topic: mobile_base/back/scan, marking: true, clearing: true}


  global_frame: /odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05


  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true


  max_vel_x: 0.45
  min_vel_x: -0.057
  max_vel_theta: 1.0
  min_vel_theta: -1.0
  min_in_place_vel_theta: 0.4

  acc_lim_theta: 6
  acc_lim_x: 5
  acc_lim_y: 5

  holonomic_robot: true

  pdist_scale: 0.8
  gdist_scale: 0.6

Thank you!