range_sensor_layer costmap plugin

1,918 views
Skip to first unread message

Matt Derry

unread,
Jul 29, 2014, 4:51:08 PM7/29/14
to ros-sig-n...@googlegroups.com
Hi all,

I noticed that the last release of hydro saw the addition of a range sensor layer plugin for the layered costmap.  Unfortunately, there is no documentation in the wiki about how to use it.  Does anyone have any example yaml files for a costmap that uses this plugin?  Thanks!

-Matt

Rein Appeldoorn

unread,
Jul 30, 2014, 3:46:29 AM7/30/14
to ros-sig-n...@googlegroups.com
Hi Matt,

I think you mean the VoxelLayer of ObstacleLayer instead of a range sensor layer. There are some tutorials which describe the configuration of the new layered costmap:


At the bottom, you see a configuration of the VoxelLayer:


plugins: 
    - {name: static_map,       type: "costmap_2d::StaticLayer"}
    - {name: obstacles,        type: "costmap_2d::VoxelLayer"}
publish_frequency: 1.0
obstacles:
    observation_sources: base_scan
    base_scan: {data_type: LaserScan, sensor_frame: /base_laser_link, clearing: true, marking: true, topic: /base_scan}
​If you do not want to do the mapping in 3D (in case of a laser range finder), you can also use the obstacle layer. Here is an example configuration:



plugins: 
    - {name: static_map,       type: "costmap_2d::StaticLayer"}
    - {name: base_laser,        type: "costmap_2d::ObstacleLayer"}

base_laser:
    observation_sources: base_laser
    base_laser:  {data_type: LaserScan,   
                 sensor_frame: /amigo/base_laser, 
                 topic: /amigo/base_front_laser,
                 observation_persistence: 0.0,
                 expected_update_rate: 50.0,
                 min_obstacle_height: 0,
                 max_obstacle_height: 2,
                 inf_is_valid: false,
                 obstacle_range: 10.0,
                 marking: true,
                 clearing: false,
                 only_recent: true,
              ray_trace_range: 10.0}

​The separate default layers which can be chosen an configured can be found here:


If you want to implement a custom layer, an example is given here:


Cheers,

-Rein


--
You received this message because you are subscribed to the Google Groups "ros-sig-navigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-navigat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Derry

unread,
Jul 30, 2014, 7:45:04 AM7/30/14
to ros-sig-n...@googlegroups.com
Thank you very much for taking the time to answer. Unfortunately, I am already familiar with the info you provided.

I am actually referring to http://www.ros.org/browse/details.php?distro=hydro&name=range_sensor_layer which was released in to Hydro as a binary and announced at the same time as the official Indigo release, it was just buried in the release notes. As you can see, there is no documentation yet of how to use it, that's what I was actually wondering about.

I know David is pretty active around these parts, so I thought he or someone else might be able to answer and it would be in a visible place for other folks as well, until the documentation gets added. The other alternative is me digging through the code to figure it out, but I thought it might be faster if one of the devs just had a sample config file.

Thanks again for taking the time to respond though.

Regards,
Matt

David Lu!!

unread,
Jul 30, 2014, 11:21:47 AM7/30/14
to ros-sig-n...@googlegroups.com
Hey Matt, 
I'll work on some basic documentation later today or tomorrow. Do you already have a source of Range msgs?
-David!!


Matt

David Lu!!

unread,
Jul 30, 2014, 3:18:05 PM7/30/14
to ros-sig-n...@googlegroups.com
Initial documentation here: http://wiki.ros.org/range_sensor_layer

Matt Derry

unread,
Jul 30, 2014, 3:38:11 PM7/30/14
to ros-sig-n...@googlegroups.com
Thank you David!  We do have a source for Range messages set up.  It's on a wheelchair that we have added 4 US and 10 IR range sensors to.  An arduino handles the control and polling of the sensors and then creates and publishes sensor_msgs:Range messages for each sensor using the rosserial_arduino package.

I'll try to get this integrated this afternoon.  Thanks again!

-Matt
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-navigation+unsub...@googlegroups.com.

Matt Derry

unread,
Jul 30, 2014, 5:13:58 PM7/30/14
to ros-sig-n...@googlegroups.com
Quick question, and I apologize for being dense, but I am having a little trouble as the layer keeps using the default topic (/sonar) instead of my own.  I have my costmap params yaml file like so (abbreviated for clarity):

system_costmap:
  plugins
:
   
- {name: obstacles, type: "costmap_2d::ObstacleLayer"}
   
- {name: ir, type: "range_sensor_layer::RangeSensorLayer"}

 
...

  ir
:
    topics
: ['/ir_fm', '/ir_fl', '/ir_fr']


Is this incorrect?

Thanks!

Matt

Matt Derry

unread,
Jul 30, 2014, 5:25:02 PM7/30/14
to ros-sig-n...@googlegroups.com
Sorry, extra slow today.  I forgot a space after the topics:.  Problem solved, seems to be working.  Thanks!

Ahmed Meer

unread,
Jan 14, 2016, 5:32:11 AM1/14/16
to ros-sig-navigation
Matt,

I also want to use range_sensor_layer to update my costmap from sonar data in addition to the laser sensor. Can you guide me what steps I need to go through to get this working. I am using ros indigo and I am getting sonar data from arduino and publishing it to '/sonar' topic. I have also added the plugin for this layer in local_costmap_params and global_costmap_params. In Rviz, when I move my robot, it shows a cone for sonar layer but it doesnot seem to be correct since it is not picking obstacles from it. Can you tell me what am I missing here. Do I need to download something extra to use the range_sensor_layer in my costmap or I can just use it by putting the relevant configuration in my yaml files. Further, I am also confused about what frame_id to use when publishing sonar data. Thanks

David Lu!!

unread,
Jan 17, 2016, 6:08:17 PM1/17/16
to ros-sig-n...@googlegroups.com
Ahmed,
I see you already have opened ROS-Answers posts about this. That is
the more appropriate venue.
-DL!!
> --
> You received this message because you are subscribed to the Google Groups
> "ros-sig-navigation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ros-sig-navigat...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages