I want to code a complete coverage path planner. So first I got a map, and I want to know how can I divide my map in little square cell and in the middle of each cell put a point. With visualization_msg, the point can just be seen by us, and not by the robot. What I want is that this point can be seen by it. So then I will be able to tell to my robot to get throw all the mark. Thank you
Originally posted by Moda on ROS Answers with karma: 133 on 2014-07-10
Post score: 0
Original comments
Comment by dornhege on 2014-07-10:
What is the map that you get? Most representations already use a grid of cells.
Comment by Moda on 2014-07-10:
My map come from a laser Scan with hokuyo,
What i want is to have a grid which the robot can understand as a real and in which it has to go.
Comment by dornhege on 2014-07-14:
What IS your map exactly?
Comment by Moda on 2014-07-15:
It a a pgm file.
Comment by Moda on 2014-07-15:
Please help me!
I'm really unable to parse the pgm file
Comment by dornhege on 2014-07-15:
Are you using the map_server? If not, do that. If you do, what error do you get?
Comment by Moda on 2014-07-15:
I don't understand, Why map_server? I already have my map, what I want is to write above this map.
I want to code a complete coverage path planner, so the idea is to put lot of point in the map, and then tell the robot to go to all the point. So I need to put the point.
Comment by Moda on 2014-07-15:
I used map_server in order to build my map and it gives any error. I have again run map_server and it says "Read a 4000 X 4000 map @ 0.050 m/cell"
Comment by dornhege on 2014-07-15:
That looks good to me. You can check that it's loaded with rviz. That standard way would be to get this map from the map server and not parsing it yourself. If you really want to, there should be code in map_server that does so.
Comment by dornhege on 2014-07-15:
Just to verify: Your map was generated with ROS tools, right? So you have a pgm and yaml file with the same names?
Comment by Moda on 2014-07-15:
Yes I have the yaml file and the pgm file.
I don't know how to open my map with rviz, I'm beginner in ros, sorry
Comment by dornhege on 2014-07-15:
Just run the map server as before. It looks like it's loaded correctly. The map display in rviz should be able to show the map.
Comment by Moda on 2014-07-15:
It is loaded with rviz. So now what I have to do? I will be so good if I don't have to parse by myself
Comment by dornhege on 2014-07-15:
Just get the nav_msgs/OccupancyGrid message from the map_server either by topic or service and do whatever you like with it.
Comment by Moda on 2014-07-17:
Sorry, I'm a beginner, and I don't know how to get this topic nav_msgs/OccupancyGrid
Comment by gautam2410 on 2015-03-05:
Hey, I am working on a similar problem, were you able to get it running?