ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to combine two gazebo worlds into one etc. separate floors of one building?

asked 2020-05-27 09:15:55 -0500

entropyboi gravatar image

I would like to create an office building in gazebo, and would like to split the world building with my other group members. As a result, I am wondering if it is possible for each member to work on each floor in separate gazebo, and then combine these separate worlds together by layering them on top of one another.

How do I approach this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-27 09:35:39 -0500

This is possible. There are a couple ways to generate the models that represent the office building, but models can be combined in a .world file and fed to Gazebo. The .world file specifies the separate models that you want included, as well as their poses, so this will allow you to align different parts of a building as separate models so long as they are the same scale.

When I've done this in the past, my .world file has looked like this:

</sdf>
     </world>

       ... scene information, etc. here ....

     <model name="building-east">
        <pose>-13.970314 -9.174326 0 0 0 0</pose>
        <include>
          <static>true</static>
          <uri>3e_real</uri>
        </include>
    </model>
    <model name="building-north1">
        <pose>-14.016079 25.839033 0 0 0 0</pose>
        <include>
          <static>true</static>
          <uri>3n_real</uri>
        </include>
    </model>
  </world>
</sdf>

Where the uri names the model resource. By default the model is searched for on the GAZEBO_MODEL_PATH or GAZEBO_RESOURCE_PATH environment variables.

This is touched on in the roslaunch gazebo tutorial.

To generate the models of the office building, you can use Gazebo's building editor, or use other CAD software and export as a mesh (.dae). You can include meshes the same way as models in the above example, and the link above goes over that as well.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-05-27 09:15:55 -0500

Seen: 847 times

Last updated: May 27 '20