Making occupancy grid map in ROS from gazebo with Octomap

Here is an example of obtaining occupancy grid from sensory data of turtlebot robot.

1.First you need to install all dependencies for gazebo and turtlebot and  octomap server:

2. Launch gazebo in a simulated environment:

3.Launch RVIZ to view the published data

3.Move your robot via keyboard:

to learn how to move the robot with your joystick controller please follow my other tutorial on that here

4. Create a txt file and save it as  octomap_turtlebot.launch. Then paste the following lines in that:


and call it by

5.Now in the rviz add an OccupancyMap and view the octomap. Of course, you need to remove the floor first 🙂


Leave a Reply

2 Comment threads
2 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Turtle Bot Robot İle Gazebo ve Rviz Ortamında Octomap Haritalama (Turtlebot Octomap 3D Mapping) – Seyfullah UysalGabriel VelásquezBehnam Asadi Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of
Gabriel Velásquez
Gabriel Velásquez

Hi, im a student from de UC3M university of Madrid. Im implementing something like that but i dont know how to vinculate gazebo with the Octomap occupancy. I’m trying to do a algorithm for obstacle avoidance of a robot manipulator then i need the info about the occupancy cells. If you got some info that can help me i will appreciate a lot.

Best Regards.


[…] Bu siteyi takip ederek yaptığım tutorialda aşağıdaki görüntü oluşmaktadır. […]