I have a project, in which I want to include two models a mir (https://github.com/DFKI-NI/mir_robot) and a ur10 (https://github.com/ros-industrial/universal_robot).
My goal is, to fixate the ur10 on top of the mir.
What I have done so far:
- Opened the demo from https://github.com/DFKI-NI/mir_robot in Gazebo.
- Inserted the ur10 robot in this demo.
- Saved the resulting world file.
Now, in my workspace I have the descriptions of the mir and the ur10, as well as the launch and world files for Gazebo.
I was easily able to position the ur10-arm on top of the mir, but of course it is not fixated. While researching this, I found that the suggested method is to add a fixed joint between them.
So, in my world file I added
<sdf version='1.7'>
<world name='default'>
<-- sun, ground plane etc. -->
<model name='mir'>
<-- all the specification for the mir robot I obtained from the demo -->
<joint name='connecting_joint' type='fixed'>
<parent>base_footprint</parent>
<child>ur10::base</child>
<pose> 0 0 0 0 0 0</pose>
</joint>
</model>
<model name='ur10'>
<-- all the specification for the ur10 robot -->
</model>
</world>
</sdf>
When I now open Gazebo, this joint appears in the list of joints for the mir robot. But the fixation does not work, the ur10 still falls of.
I then turned to the model editor in Gazebo. But since I cannot edit both of my models at the same time, I cannot add a joint between them. When I added a box and added the fixed joint between it and the mir, it worked flawlessly.
I have also read about model nesting, but this seems to only apply to Gazebo Classic. In addition, if fixed joint is the correct way to do this, I would like to do it this way.
If anyone can tell, what I have done wrong or what needs to be done additionally to make this work, I would be grateful.