Robotics StackExchange | Archived questions

Save points with map_server

Hello,

I am currently able to run a robot with a joystick on rviz and get x and y points via odometry but I would like to save the all these points on a pgm file using map_saver.

Is there a simple way to do it like adding it on a launchfile to save the image ?

Regards,

Asked by Dben on 2015-06-29 11:53:40 UTC

Comments

You mean to save the (x,y) points computed by odometry?

Asked by Javier V. Gómez on 2015-06-29 12:14:22 UTC

Yes, sorry for not being precise. I would like to store (x,y) as "black" and the rest as "white" on the pgm

Asked by Dben on 2015-06-29 13:08:42 UTC

What do you want to do with this?

Asked by mgruhler on 2015-06-30 01:01:46 UTC

I would like to save the path of my robot by odometry and make it visible on a PGM. Using your answer, I'd have to save points in an occupancy grid and publish it over the /map topic ? If so, how do I work with this grid ? Thanks

Asked by Dben on 2015-07-08 09:01:14 UTC

Answers

You need to write a node that subscribes to those points, creates a map and publishes this over the /map topic. Once you are done, you can call

rosrun map_server map_saver

Then, in the next run, you can load this using the map_server.

Asked by mgruhler on 2015-06-30 01:01:10 UTC

Comments