gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.19k stars 480 forks source link

Composite model sdf : self collision flag usage #2313

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by yeshasvitvs (Bitbucket: yeshasvitvs).


Hello,

I tried to use two gazebo models in a single sdf with some of their links connected through a fixed joint. One of the models is of the iCub robot and the other is a 2 link manipulator. When launching this composite model in gazebo I noticed that iCub robot is exploding. The problem was self_collision flag is set in the manipulator sdf and it is not set in icub sdf. So when loading the composite model the flag is enabled and this leads to self collisions in iCub robot and the explosive behaviour. By setting the flag false things are normal when loading the composite model.

#!xml

<?xml version='1.0'?>
<sdf version='1.5'>
  <model name="icub_1r_2link">

    <include>
      <uri>model://icub</uri>
    </include>

    <include>
      <uri>model://1r_2link</uri>
      <pose>.4 0.114639 0.1 0 0 -0.43</pose>
    </include>

    <joint name='first_hand_joint' type='fixed'>
      <child>1r_2link::first_link_handle</child>
      <parent>iCub::l_hand</parent>
      <axis>
        <xyz>0 0 0</xyz>
      </axis>
    </joint>

    <joint name='second_hand_joint' type='fixed'>
      <child>1r_2link::second_link_handle</child>
      <parent>iCub::r_hand</parent>
      <axis>
        <xyz>0 0 0</xyz>
      </axis>
    </joint>

  </model>
</sdf>
osrf-migration commented 7 years ago

Original comment by yeshasvitvs (Bitbucket: yeshasvitvs).


osrf-migration commented 7 years ago

Original comment by yeshasvitvs (Bitbucket: yeshasvitvs).