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

Is there a way to check if a certain coordinate is within the bounds of the map

asked 2019-12-05 14:04:09 -0500

jonx0880 gravatar image

updated 2019-12-05 14:04:26 -0500

Hello everyone. I have a specific map visualized in rviz. In this map a a function generates markers in a x*y grid. I want to check when a marker is either outside of the map or inside a obstacle.

In the picture we can see some markers are outside of the map or in a obstacle/wall.

link to map: Rviz

Are there a way to check if a marker is inside the light grey area (where the robot can move)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-05 15:20:02 -0500

Whatever is broadcasting the markers, have it subscribe to the map topic itself. Using that information you can determine if its in the bounds knowing the map properties, then only publish the ones in the map boundaries.

edit flag offensive delete link more

Question Tools


Asked: 2019-12-05 14:02:58 -0500

Seen: 371 times

Last updated: Dec 05 '19