This folder contains meshes to be converted to STL format for use in Gazebo7.
This is because Gazebo7 does not support the OBJ format, only Gazebo 7.4. Upgrading to Gazebo7.4 is possible but ill-advised as it might break some things that otherwise worked well in the ROS Kinetic install.
The Meshes to be Edited
folder is the working folder for conversion.
Most of the models can be found in /home/ubuntu/Downloads/osrf-gazebo_models-e6d645674e8a
. If not, they can be downloaded here: OSRF Gazebo Model Repo
The models can also be found installed in /home/ubuntu/.gazebo/models
where they can then be accessed by Gazebo itself.
Get the OBJ models from /model_name/meshes/model_name.obj
-
Import them into blender via the import dialog
-
Export them as STL in blender via the export dialog
-
Place the exported the STL into the the same folder as the OBJ (deletion of the original OBJ file is optional)
-
Open up
/model_name/model.sdf
. It should look something like this:<?xml version="1.0" ?> <sdf version="1.6"> <model name="ambulance"> <static>true</static> <link name="link"> <collision name="collision"> <geometry> <mesh> <scale>0.0254 0.0254 0.0254</scale> <uri>model://model_name/meshes/model_name.obj</uri> </mesh> </geometry> </collision> <visual name="visual"> <geometry> <mesh> <scale>0.0254 0.0254 0.0254</scale> <uri>model://model_name/meshes/model_name.obj</uri> </mesh> </geometry> </visual> </link> </model> </sdf>
- Replace all instances of
model://model_name/meshes/model_name.obj
withmodel://model_name/meshes/model_name.stl
. - It should now be possible to load the model into Gazebo7.
- Replace all instances of