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

How can I get nearest occupied point from map?

asked 2013-01-07 20:09:38 -0600

Alexandr Buyval gravatar image

Hi,

I am trying to write simple node of particle filter for Gazebo model of robot with diff drive and sonar sensors. I use map_server node to load map. I need method (or node) to get nearest occupied point from map to defined direction. It means, I would like model of sonar sensor on map. Is there such possibility in ROS?

Best Regards, Alex

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-08 14:49:28 -0600

HammyG gravatar image

You will have to create your own node that subscribes to the map (OccupancyGrid) from the map_server, on topic /map. Once you have that you can find out which cells in the map are occupied.

edit flag offensive delete link more

Comments

The hector_map_server package from the hector_slam stack contains a node, that advertises a service to retrieve the distance to the nearest obstacle, given a source frame_id and point to specify the direction. You can use it directly or take it as an example.

Johannes Meyer gravatar image Johannes Meyer  ( 2013-02-08 22:32:28 -0600 )edit

Awesome! That will come in handy for me.

HammyG gravatar image HammyG  ( 2013-02-09 03:35:33 -0600 )edit

Question Tools

Stats

Asked: 2013-01-07 20:09:38 -0600

Seen: 364 times

Last updated: Feb 08 '13