This package allows to convert a 2D laser map in the g2o format into an occupancy grid compatible with ROS/Stage.
- Clone the repository in your catkin workspace
- Compile with
catkin_make
Run the g2o2ros node using as input a 2D graph in g2o format created with your favourite mapper.
In a terminal type:
$ rosrun g2o2ros g2o2ros input_graph.g2o output_map
It will create a output_map.png and output_map.yaml compatible with ROS/Stage.
Optional parameters can be visualized running the node with the -h
option.
Hint: You will probably want to tune the -usable_range
and -resolution
options among others.
In a terminal type:
$ rosrun cg_mrslam real_mrslam -idRobot 0 -nRobots 1 -scanTopic base_scan -o testmrslam.g2o -fixedFrame map
In another terminal type:
$ rosrun g2o2ros g2o2ros_node robot-0-testmrslam2o