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

Revision history [back]

click to hide/show revision 1
initial version

I finally found my failures. the first failure was that i loaded the costmap_common_files without namespace (ns)

<!-- move base node  ########################################################################## -->

  <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS"/>
    <param name="base_global_planner" value="carrot_planner/CarrotPlanner"/>
  <param name="robot_description"
    textfile="$(find cartographer_ros)/urdf/00_Kobuki_rp.urdf" />

   <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
   <rosparam file="$(find kobuki_nav)/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
   <rosparam file="$(find kobuki_nav)/costmap_common_params.yaml" command="load" ns="local_costmap" />

   <rosparam file = "$(find kobuki_nav)/local_costmap_params.yaml" command="load" />
   <rosparam file="$(find kobuki_nav)/global_costmap_params.yaml" command="load" />    

   <rosparam file="$(find kobuki_nav)/dwa_local_planner_params.yaml" command="load" /> 
   <rosparam file="$(find kobuki_nav)/base_local_planner_params.yaml" command="load" /> 
   </node>

And the second thing is that the *_params.yaml needed a little adaption

the right settings are below:

costmap_common_parameters.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: true
  transform_tolerance: 0.5
  meter_scoring: true

  footprint: [[-0.21, -0.165], [-0.21, 0.165], [0.21, 0.165], [0.21, -0.165]]
  footprint_padding: 0.1

  plugins:
    - {name: static_layer, type: "costmap_2d::StaticLayer"}
    - {name: obstacles_layer, type: "costmap_2d::VoxelLayer"}
    - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

  static_layer:
    map_topic: /map
    subscribe_to_updates: true
    static_map: true  

  obstacles_layer:
    observation_sources: scan
    scan: {sensor_frame: rp_link, data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: -2.0, max_obstacle_height: 2.0, obstacle_range: 2.5, raytrace_range: 8.5}

  inflater_layer:
    inflation_radius: 0.1

local_costmap_parameters.yaml

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

global_costmap_parameters.yaml

global_costmap:
   global_frame: map
   robot_base_frame: base_footprint
   update_frequency: 20.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