Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

I'm not sure which tutorial you're referring to. But I also didn't find any specific tutorial on importing COLLADA meshes on the model editor, so I'll risk being overly detailed and try to give you a general overview of the process.

Import all the meshes

I'm not sure if you're clear on how to import the COLLADA meshes, so before getting to your point, let's go through the process of importing a mesh:

  1. Enter the editor
  2. On the left panel, under "Custom Shapes", click "Add"
  3. Browse for the mesh file and click "Import"
  4. A new link will appear on the 3D view using your mesh as a visual and as a collision. Click anywhere to place it.

Now repeat this for all the parts on your model. By this point, you'll have all the parts all over the place and not properly connected.

Constraints inside the editor

One thing which might be confusing is that unlike some CAD editors, on the model editor, part placement is independent of constraint creation. On Gazebo, constraints are called "joints". But these joints only take effect while you're simulating, and not inside the editor. This means that even after you create joints between links, these links can be manipulated freely in the editor.


Now we need to do two things: position the links and create joint constraints. Steps 7 to 14 on this tutorial explain how you could do both at the same time. I imagine this could be the tutorial you went through? The tools available in the Joint Creation Dialog allow you to align and precisely position the parts you're connecting.

If those tools are not enough for you, after creating the joint, you can always reposition the links using the translate, rotate, snap and align tools and visually inspect the model to check if things look like they're going where they should. You can always use the link inspector if you need to have finer control on the position coordinates. Even if you don't know those numbers beforehand, as you said, you can change them and visually inspect how that affects the model.

There is no way to create reference axes, planes and things like that on Gazebo yet, so for now you'd have to use these tools.

Finally, you asked about the "proper way to do it". My personal opinion is that if you have parts which have been carefully sized and want to place them very precisely, you should be able to come up with the exact coordinates for the links by hand, and type those into the editor.