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

problem of adding the range_sensor_layer to costmap_2D plugins

asked 2016-08-10 10:38:25 -0600

zink gravatar image

updated 2016-08-21 17:37:43 -0600

David Lu gravatar image

I am a fresh man to ROS system.I bulid a robot platfom use ros. i use move_base in my systerm.
I have a laser scan and some ultrasonic sensors in my systerm,but for using the ultrasonic sensor i got some problem.
i dont konw how to add the range_sensor_layer as a costmap plugins.
i tried just add

In costmap_common_params.yaml
add the layer of ultrasonic

 enabled: true  
 max_obstacle_height: 0.4  
 origin_z: 0.0  
 z_resolution: 0.2  
 z_voxels: 2  
 unknown_threshold: 15  
 mark_threshold: 0  
 combination_method: 1  
 track_unknown_space: true #true needed for disabling globalpath planning through unknown space  
 obstacle_range: 1.0  
 raytrace_range: 3.0  
 publish_voxel_map: false  
 observation_sources: ultrasonic  
  data_type: Range  
  topic: ultrasonic  
  marking: true  
  clearing: true  

In local_costmap_params.yaml like

  - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}  
  - {name: ultrasonic,   type: "range_sensor_layer::RangeSensorLayer"}  
  - {name: inflation_layer, type: "costmap_2d::InflationLayer"}  

but when i run the move base i got some error said: "range_sensor_layer::RangeSensorLayer" is not surported by the plugin .

i can get the range informations using : $rostopic echo ultrasonic

did i missed something? or did i do somrthing wrong?
and can anybody tell me the correct way to use the range_sensor_layer as a plugin?

thanks a lot

edit retag flag offensive close merge delete


Can you please post the actual error message that you got?

David Lu gravatar image David Lu  ( 2016-08-21 17:38:25 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-20 13:38:12 -0600

biglotusturtle gravatar image

updated 2017-09-20 13:39:56 -0600

My guess is your issue stems from how you defined your ultrasonic plugin. Try the following instead:

    topics: ["/ultrasonic"]
    no_readings_timeout: 1.0
    clear_on_max_reading: true

Then also remove all of your "ultrasonic_layer:" definition to prevent confusion (Unless you are using that plugin elsewhere). You only need to define a layer/plugin once.

Also the RangeSensorLayer has no 'marking' or 'clearing' parameters (unlike ObstacleLayer) so you don't need those lines.

Let us know if this fixes your problem.

edit flag offensive delete link more

Question Tools


Asked: 2016-08-10 10:38:25 -0600

Seen: 1,251 times

Last updated: Sep 20 '17