Ask Your Question
0

Empty Costmap using PointCloud2

asked 2017-11-20 02:08:28 -0500

reben gravatar image

updated 2017-11-29 23:29:43 -0500

When I run rostopic echo /move_base/local_costmap/costmap, the costmap data is filled with zeros even though it has a pointcloud2 observation source. Below are all the costmap params and the two launch files I run at startup.

costmap_common_params.yaml:

obstacle_range: 25
raytrace_range: 25
footprint: [[1.65, 1.02], [2, 0], [1.65, -1.02], [-1.65,-1.02], [-1.65,1.02]]
footprint_padding: 1
inflation_radius: 6
max_obstacle_height: 100

observation_sources: velodyne

velodyne: {sensor_frame: velodyne, data_type: PointCloud2, topic: velodyne_points, marking: true, clearing: true, min_obstacle_height: -10, obstacle_range: 25, raytrace_range: 25}

plugins:
 - {name: obstacle, type: "costmap_2d::ObstacleLayer"}
 - {name: inflation, type: "costmap_2d::InflationLayer"}

obstacle:
  track_unknown_space: true

global_costmap_params.yaml:

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 1.0
  static_map: false
  rolling_window: true

local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 1.0
  publish_frequency: 0.5
  static_map: false
  rolling_window: true
  width: 10.0
  height: 10.0
  resolution: 0.025
  origin_x: 0.0

move_base.launch:

<launch>
  <master auto="start"/>

  <!-- Run the map server -->
  <!--  <node name="map_server" pkg="map_server" type="map_server" args="$(find map_server)/tutorialMap.pgm 0.05"/> -->


  <!--- Run AMCL -->
  <!--  <include file="$(find amcl)/examples/amcl_omni.launch" /> -->

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find bolt_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find bolt_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find bolt_2dnav)/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find bolt_2dnav)/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find bolt_2dnav)/base_local_planner_params.yaml" command="load" />
    <param name="odom_frame_id" value="odom"/>
    <param name="base_frame_id" value="base_link"/>
    <param name="global_frame_id" value="map"/>
  </node>
</launch>
  origin_y: 0.0
  min_obstacle_height: -10.0

robot_configuration.launch:

<launch>
  <node pkg="robot_setup_tf" type="odom" name="odom" output="screen">
  </node>

  <node pkg="robot_setup_tf" type="tf_broadcaster" name="tf_broadcaster" output="screen">
  </node>

  <!-- <param name ="/use_sim_time" value="true"/> -->

  <node pkg="tf" type="static_transform_publisher" name="map_odom_tf_broadcaster" args="0 0 0 0 0 0 1 map odom 10" />

</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-30 01:04:47 -0500

mgruhler gravatar image

You need to add the observation sources inside of the plugin that should use them.

Thus, move those into the obstacle plugin like so:

plugins:
 - {name: obstacle, type: "costmap_2d::ObstacleLayer"}
 - {name: inflation, type: "costmap_2d::InflationLayer"}

obstacle:
   observation_sources: velodyne

   velodyne: {sensor_frame: velodyne, data_type: PointCloud2, topic: velodyne_points, marking: true, clearing: true,    min_obstacle_height: -10, obstacle_range: 25, raytrace_range: 25}

  track_unknown_space: true
edit flag offensive delete link more

Comments

Thanks for the response. I tried this solution but it seems to be outputting empty still.

reben gravatar image reben  ( 2017-11-30 01:48:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2017-11-20 02:08:28 -0500

Seen: 726 times

Last updated: Nov 30 '17