0
$\begingroup$

Gazebo Answers logo

I need to make a bunch of models each having an identical copy of a particular link. What's the best way of doing that without copying and pasting the entire XML for the link every time? Can I use an <include> element for this somehow?


Originally posted by JasonMel on Gazebo Answers with karma: 35 on 2016-08-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

I've never tried this, but it should be possible to <include> a model within another one. The SDF parser just expands the links of the included model within the parent model. You can see an example here.

So in your case, you could make a base model which has the link that should be shared, and include that in each new model.


Originally posted by chapulina with karma: 7504 on 2016-08-25

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by JasonMel on 2016-09-19:
This definitely works. Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.