Created
April 13, 2018 12:38
-
-
Save plusangel/02a765f21aadf1dc7c30297defb5193d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to download all Gazebo models | |
Gazebo is a wonderful simulation tool widely used in robotics projects. The project includes a library of 3D models that are automatically downloaded on demand. However this makes the application pause each time a model is used for the first time, which can take a considerable time depending on connection speed and interfere with the flow of work. | |
In order to avoid this issue I wrote the below script to do a bulk download of all models in the Gazebo library, then copy them to the local model folder. Simply copy the lines below to a script file on a convenient local folder and run it from a command prompt. | |
#!/bin/sh | |
# Download all model archive files | |
wget -l 2 -nc -r "http://models.gazebosim.org/" --accept gz | |
# This is the folder into which wget downloads the model archives | |
cd "models.gazebosim.org" | |
# Extract all model archives | |
for i in * | |
do | |
tar -zvxf "$i/model.tar.gz" | |
done | |
# Copy extracted files to the local model folder | |
cp -vfR * "$HOME/.gazebo/models/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment