0
$\begingroup$

Rosanswers logo

Does URDF support building a larger model from smaller models defined in other URDF files?

I'm trying to model a simple quadruped, and I initially modelled the entire thing in a few hours with modular SDF files, following a Gazebo tutorial, but then I learned ROS doesn't support SDF at all. So now I'm trying to remodel it in URDF and I'm finding it incredibly difficult. It's been days, and I've barely accomplished anything, which only took me a few hours in SDF despite having zero experience with SDF.

I've tried following the URDF tutorial, but it doesn't explicitly mention any include ability, but from the examples, it looks like Xacro might technically accomplish this. Although I'd like to avoid using complicated macro tools to do something so simple. Is using Xacro the only way?


Originally posted by Cerin on ROS Answers with karma: 940 on 2015-04-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

http://wiki.ros.org/xacro#Including_other_xacro_files


Originally posted by DLu with karma: 38 on 2015-04-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Cerin on 2015-04-26:
That's not really what I'm looking for. Xarco:include seems to essentially copy and paste one file into another. If I had a complicated leg model in one file and I wanted to include it four times in different poses and angles, it wouldn't let me do that. It would only make four identical copies.

Comment by DLu on 2015-04-26:
Then you should transform the entire thing into a macro, save it in its own individual file, then instantiate several different instances of the macro.

$\endgroup$

Your Answer

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