What is the recommended way to give a robot a predefined set of waypoints?
I am assuming I have a map, and the robot is localized within it. I would like to give an input of waypoints as a csv, json, or similar, and I would like the robot to travel there.
The waypoints need to be generated based on the map, to make sure they are valid.
I can subscribe to the map topic, and get the map that way, but I am not sure how I can send a set of points to which the robot needs to travel to.
I would also like to specify the direction in which the robot should face, at those locations. (I want my robot to travel in a grid like pattern, stopping at every intersection)
What is the ROS way of doing this?
Thank you
EDIT: I found a way to solve the problem, it involves the method M@t mentioned. Here is my code for anybody that needs it:
Hi @Cristian11235 This may seem to be off topic or against the norms here as I'm not creating a question, but I couldn't find any other way. Guess I'm posting pretty late. I did try using your script. Is it such that the goal points created appear out of the map frame for maps other than the one included with the script? When I use it on a different map, the selected waypoints have locations out of the map frame and so do the ones created in between them. Would it be possible to know why this happens?
Thank you.