Importing a model into Gazebo
Shows how an exported SolidWorks model can be opened in Gazebo
Verify model install location
Ensure you have exported your SolidWorks model and have saved it onto your computer.
If you place the folder in ~/wpilib/simulation/models then you can skip the next step.
Custom Install Location
Locate wherever you exported your model. Within that folder you will find a folder with your model's information, and a .world file. You can tell Gazebo to look in that folder for models by adding it to the GAZEBO_MODELS_PATH environment variable.
Open up the file called frcsim located at wpilib/simulation/ and find the line that says:
Concatenate your path to that variable. Here's what it might look like after:
Opening the model in Gazebo
Models in gazebo can be opened in one of two ways
- Through a world file
- From the insert tab
World files can describe multiple models' locations, as well as lighting and camera information. Open up a terminal and run:
This will launch gazebo with that world file. If you want to use the same world file all the time, you can simply add that to the frcsim file in ~/wpilib/simulation
FRC 2016 Field!
The 2016 field models are now available in the insert tab of gazebo! We've written a world file for you as well, so you can import all the pieces in the right spot.
Checkout the download section here!