A super easy-to-use tool for generating 3D Gazebo terrain.
It's recommended to use a virtual environment to avoid dependency conflicts:
For Linux/macOS
python3 -m venv venv
source venv/bin/activate
For Windows
python -m venv venv
venv\Scripts\activate
Make sure your virtual environment is active, then install all required Python packages using:
pip install -r requirements.txt
-
Navigate to the
gazebo_terrian_generator
repository:cd gazebo_terrian_generator/scripts python server.py
-
To access application open up your web browser and navigate to
http://localhost:8080
. -
Gazebo world generated are stored inside
output/gazebo_terrian/
by default. Feel free to change the path defined inscripts/utils/param.py
as per you choice.
- Export gazebo resource path based on your gazebo version. Use the table below as reference.
Gazebo Version | Resource Path Variable(s) |
---|---|
Ignition and later | export IGN_GAZEBO_RESOURCE_PATH=$IGN_GAZEBO_RESOURCE_PATH:~/<your model directory path> |
Harmonic | export GZ_SIM_RESOURCE_PATH=$GZ_SIM_RESOURCE_PATH:~/<your model path here> |
- Run Gazebo with the required world file.
Gazebo Version | Resource Path Variable(s) |
---|---|
Ignition and later | ign gazbeo "<path of your world file> |
Harmonic | gz sim <path of your world file file> |
Note: Replace path with your actual path of the .world.
- Export the gazebo model path
Gazebo Version | Resource Path Variable(s) |
---|---|
Ignition and later | export IGN_GAZEBO_RESOURCE_PATH=$IGN_GAZEBO_RESOURCE_PATH:~/gazebo_terrian_generator/sample_worlds |
Harmonic | export GZ_SIM_RESOURCE_PATH=$GZ_SIM_RESOURCE_PATH:~/gazebo_terrian_generator/sample_worlds |
- Spawing gazebo world.
Gazebo Version | Resource Path Variable(s) |
---|---|
Ignition and later | ign gazebo prayag/prayag.world |
Harmonic | gz sim prayag/prayag.world |
Downloading map tiles is subject to the terms and conditions of the tile provider. Some providers such as Google Maps have restrictions in place to avoid abuse, therefore before downloading any tiles make sure you understand their TOCs. I recommend not using Google, Bing, and ESRI tiles in any commercial application without their consent.
This project uses work of Ali Ashraf.