Ask Your Question

Revision history [back]

An easy way to achieve your goal is to utilize xacro macros for your models (see xacro on the wiki and the Using Xacro to Clean Up a URDF File tutorial. By using xacro macros for your models, it is straightforward to instantiate your models alone or compose more complex models out of the macros you created.

Here´s an example I created recently:

An easy way to achieve your goal is to utilize xacro macros for your models (see xacro on the wiki and the Using Xacro to Clean Up a URDF File tutorial. By using xacro macros for your models, it is straightforward to instantiate your models alone or compose more complex models out of the macros you created.

Here´s an example I created recently:

/edit: The above is the easiest way to achieve the " fix the robot to the environment relative to some frame" part of your request. Really performing two separate "spawn model" executions and attaching models to each other on the fly probably is harder to achieve. It might make sense to ask about this at http://answers.gazebosim.org/questions/.