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

Revision history [back]

Take a look at opencv cv::distanceTransform http://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html#distancetransform

You would convert your map into a binary image making the obstacles 0/black, open space white. The label functionality will give you the location of the nearest obstacle.

Some similar questions: http://answers.ros.org/question/12380/opencv-distance-transform/ http://answers.ros.org/question/46810/generalized-voronoi-graph-any-package/