# gazebo_ros_2Dmap_plugin **Repository Path**: shoufei/gazebo_ros_2Dmap_plugin ## Basic Information - **Project Name**: gazebo_ros_2Dmap_plugin - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-07 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gazebo_ros_2Dmap_plugin Gazebo simulator plugin to automatically generate a 2D occupancy map from the simulated world at a given certain height. This plugin was adapted from the [octomap plugin](https://github.com/ethz-asl/rotors_simulator/tree/master/rotors_gazebo_plugins) from ETH Zürich. ## Usage Check out the plugin in your `catkin_ws` and build it with `catkin_make`. To include the plugin, add the following line in between the ` ` tags of your Gazebo world file: ``` 0.1 0.3 10 10 0 0 ``` To generate the map, call the `/gazebo_2Dmap_plugin/generate_map` ros service: ``` rosservice call /gazebo_2Dmap_plugin/generate_map ``` The generated map is published on the `/map2d` ros topic. You can use the `map_saver` node from the `map_server` package inside ros navigation to save your generated map to a .pgm and .yaml file: ``` rosrun map_server map_saver -f /map:=/map2d ``` The last map generated with the ```/gazebo_2Dmap_plugin/generate_map``` call is saved. ## Hints * To identify the connected free space the robot would discover during mapping, the plugin performs a wavefront exploration along the occupancy grid starting from the origin of the gazebo world coordinate system. Please ensure that the corresponding cell is in the continuous free space. * The plugin will map all objects in the world, including the robot. Remove all unwanted objects before creating the map.