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

How to include files in URDF

asked 2015-04-26 16:13:15 -0500

Cerin gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-04-26 18:25:52 -0500

DLu gravatar image
edit flag offensive delete link more

Comments

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.

Cerin gravatar image Cerin  ( 2015-04-26 19:36:37 -0500 )edit
2

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.

DLu gravatar image DLu  ( 2015-04-26 21:06:07 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-26 16:13:15 -0500

Seen: 3,722 times

Last updated: Apr 26 '15