[ros-users] Is there any way to implement a "for" loop with xacro?

Stuart Glaser sglaser at willowgarage.com
Mon Oct 11 04:47:44 UTC 2010


Hi Patrick,

In order to keep xacro simple it does not support any looping mechanisms.

Since URDF files are just XML, you can generate them any number of
ways.  Just generating the desired XML from any scripting language
(Python, Ruby, etc...) would be the simplest way.  Generating the XML
using XSLT is also possible, though not necessarily recommended.

-Stu

On Sun, Oct 10, 2010 at 2:55 PM, Patrick Doyle <wpdster at gmail.com> wrote:
> If not, what would it take to add such a feature?
>
> Alternatively, is there any way to construct a world file or URDF that
> consisted of a uniform array (or matrix) of identical objects?
>
> --wpd
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Stuart Glaser
sglaser -at- willowgarage -dot- com
www.willowgarage.com



More information about the ros-users mailing list