A tools to generate Gazebo models from 3D models.(Sketchup files, *.dae, *.obj, *.stl, etc.)
The scripts will be released soon.
Step 1: Download the data from 3d warehouse.
Step 2: Using sketchup tools to convert *.skp files to *.obj with texture.
Step 3: using scripts convert to gazebo model and copy it to ~/.gazebo/models/
A tools(python scripts) to generate Gazebo models from 3D models.(Sketchup files, *.dae, *.obj, *.stl, etc.).
A tools(python scripts) to generate Gazebo models from 3D models.(Sketchup files, *.dae, *.obj, *.stl, etc.).
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This project is provide a scrip to convert 3D models from sketchup and convert it to gazebo models.
This project provide a gazebo world. so if you wanna test the code, you need prepare the simulation world.
Step 1: you need download sketchup software and install it in your Windows PC or Mac OX, Then choose your favourite models and download the sketchup files from this LINK.
Step 2: Open *.skp files using Sketchup Software and export it in *.obj format, you will get MODEL_NAME.mtl, MODEL_NAME.obj, MODEL_NAME/
3 files.
Step 3:
mkdir auto_gen && cd auto_gen
git clone https://github.com/TurtleZhong/Gazebo-models-generator.git
usage: gazebo_models_generator.py [-h] [--model_type MODEL_TYPE]
[--model_name MODEL_NAME]
[--author_name AUTHOR_NAME]
[--author_email AUTHOR_EMAIL]
optional arguments:
-h, --help show this help message and exit
--model_type MODEL_TYPE
The 3d model format(obj,stl,dae)
--model_name MODEL_NAME
The output of the gazebo model name
--author_name AUTHOR_NAME
The output of the Author name
--author_email AUTHOR_EMAIL
The output of the author email
Put the output of sketchup software, and put them in the input/
folder, eg Earth
.
├── gazebo_models_generator.py
├── images
│ ├── earth_sketchup.gif
│ └── model_to_gazebo.gif
├── input
│ ├── Earth
│ ├── Earth.mtl
│ └── Earth.obj
├── LICENSE
├── output
│ └── models
├── README.md
└── sample
├── meshes
├── model.config
├── model.sdf
└── test.xml
We only support *.obj format.
cd Gazebo-models-generator/
python3 gazebo_models_generator.py --model_name=Earth
python3 gazebo_models_generator.py --model_name=YOUR_MODEL_NAME
YOUR_MODEL_NAME must be the same with your sketchup export name!!!
The script will automacticly gen gazebo models in output/models/MODEL_NAME
, copy it to the ~/.gazebo/models/
cp -r output/models/MODEL_NAME ~/.gazebo/models/
If everything is OK, you will get this:
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License.
Xinliang Zhong - @zxl - [email protected]
Project Link: https://github.com/TurtleZhong/Gazebo-models-generator