raceli / nav2_random_map_generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Navigation 2 Random Map Generator

This tool creates randomly generated maps and world models that can be used by Navigation 2 and Gazebo. It uses a small portion of the HouseExpo data set. It is a set of 2D empty hand-drawn indoor layout images. The empty maps are located in the maps directory. The random map generator randomly places obstacles in grayscale maps. The maps must be in .png format. Currently, adding circles, squares, and ramps are supported. Size, shape, type, and distance between obstacles can be configured by the user. Gazebo heightmap is used to create a Gazebo world model of a randomly generated map. The random_world directory can be copied in .gazebo/model directory to be used with Gazebo. The generated map size must be 2^n+1 x 2^n+1. Otherwise, it will not work with Gazebo. World model size in Gazebo is scaled to 20-meter x 20-meter.

Documentation

How It Works

enter image description here

Build and Run Instructions

Tested System

  • Ubuntu 18.04.03 Bionic Beaver
  • Gazebo 9

1 - Install the Dependencies:

sudo apt-get update
sudo apt-get upgrade
  • Install OpenCV

      sudo apt-get  update
      sudo apt-get  upgrade
      sudo apt-get  install libopencv-dev
    

2 - Run the Program

./map_generator <Map Id> <Number_of_Circles> <Number_of_Squares> <Robot_Size (px*0.03898)> <Map_Size(x)> <Map_Size(y)> <Min_Circle_Radius> <Max_Circle_Radius> <Min Square_Size> <Max_Circle_Radius> <Add Ramp> <Show_Map>

Example:

./map_generator 10 200 200 5 513 513 5 10 5 10 1 1

3 - Help Menu

./map_generator h

Examples

Randomly Generated Map Example

enter image description here

Randomly Generated Gazebo World Example

enter image description here

Randomly Generated Map, Navigation 2, Turtlebot 3, and Rviz

enter image description here

Adding Ramps to the Map

enter image description here

Videos

Ramdom Map TB3 Test Video

Ramdom Map Ramp Test Video

About


Languages

Language:C++ 98.7%Language:Makefile 1.3%