Home | Tutorials | Wiki | Issues
Ask Your Question

How to open a solidworks model in gazebo ?

asked 2017-04-17 09:39:58 -0500

RH gravatar image

updated 2017-04-17 15:08:13 -0500

Carlos Agüero gravatar image

As a person who is new to gazebo and even ubuntu I have some basic questions. I wanted to open a SOLIDWORKS created model in gazebo. According to information that I received from SOLIDWORKS sources, I downloaded SW2URDF add-in and used it to create a URDF file. Unfortunately I've got mixed information about opening a model in gazebo, I don't even know which format is the correct one: URDF, Collada (.dae), SDF (I don't know how to import my file as a SDF from SOLIDWORKS and don't know if its a possible thing or not).

After creating such file, what's the next step for opening my model? Among the tutorials from gazebosim.org I found this one useful but my problem is how should I use it. I tried to save an empty world file and use the syntax to add my file but I have a stupid problem which is how to open this world file after saving it?! And is this the right way to do such a thing?!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-04-17 11:14:02 -0500

eugene-katsevman gravatar image

To work with ROS, you have to create a urdf model, which references DAE files as meshes for robot parts. To create this URDF and DAE files, you could use SW2URDF plugin for solidworks. Although it is working, it may give you some unwanted surprises (like wrong paths and so on). Make sure you use latest SW2URDF and please note, that "official" SW2URDF is pretty old. Check its forks and what bugs are fixed there.

SW2URDF creates not only an URDF model, but a system of ROS packages, with a model.config, which might be used in Gazebo. AFAIK it even creates corresponding launch files to open your model in an empty world, But again, paths needs to be messed with. So, after checking your newly created ROS packages, you might start your model with roslaunch.

To actually be able to import your model into Gazebo, you have to add a directory, where the directory with model is placed, to the GAZEBO_MODEL_PATH environment variable. Best place to do it is in your .profile or .bashrc/.zshrc file.

edit flag offensive delete link more


thanks for your consideration. Could you recommend any organized tutorial over this ? As I said I'm new to both ubuntu and gazebo so I actually don't know how should I add a directory and any further path that I should take after that, and I actually didn't found any useful tuturial :( thanks again

RH gravatar imageRH ( 2017-04-23 01:00:01 -0500 )edit

Sorry, I can't. Actually I'm collecting material to write a bunch of tutorials myself. To little information over there. Best way to try it out - start small. Start with your own urdf/sdf and learn to use it. Then you'll know what to expect and how to interpret the output of SW2URDF

eugene-katsevman gravatar imageeugene-katsevman ( 2017-04-23 12:38:05 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-04-17 09:39:58 -0500

Seen: 65 times

Last updated: Apr 17