Ask Your Question
0

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: https://imgur.com/Cduta5R 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
0

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 126 times

Last updated: Dec 05 '19