<br><br><div class="gmail_quote">On Wed, May 26, 2010 at 8:32 PM, John Hsu <span dir="ltr"><<a href="mailto:johnhsu@willowgarage.com">johnhsu@willowgarage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
seems xacro:parameter should be xacro:property, then things should work.  I'll update the wiki.<br></blockquote><div><br>Yes,  xacro:property works. For the record, a xacro:property cannot be declared inside a xacro:macro.<br>
<br>Adolfo<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">John<br><br><div class="gmail_quote">2010/5/26 Adolfo Rodríguez Tsouroukdissian <span dir="ltr"><<a href="mailto:adolfo.rodriguez@pal-robotics.com" target="_blank">adolfo.rodriguez@pal-robotics.com</a>></span><br>


<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">Update.<br><br>The problem seems to be more general in that I am unable to use xacro:param at all, which makes me think that I might be using it the wrong way. This code also errors out :<br>


<br><span style="font-family: courier new,monospace;"><?xml version="1.0"?></span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><robot xmlns:xacro="<a href="http://www.ros.org/wiki/xacro" target="_blank">http://www.ros.org/wiki/xacro</a>"</span><br style="font-family: courier new,monospace;">



<span style="font-family: courier new,monospace;">       xmlns:sensor="<a href="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" target="_blank">http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor</a>"</span><br style="font-family: courier new,monospace;">



<span style="font-family: courier new,monospace;">       xmlns:controller="<a href="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" target="_blank">http://playerstage.sourceforge.net/gazebo/xmlschema/#controller</a>"</span><br style="font-family: courier new,monospace;">



<span style="font-family: courier new,monospace;">       xmlns:interface="<a href="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" target="_blank">http://playerstage.sourceforge.net/gazebo/xmlschema/#interface</a>"</span><br style="font-family: courier new,monospace;">



<span style="font-family: courier new,monospace;">       name="foo" ></span><span style="font-family: courier new,monospace;"></span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  <xacro:parameter name="the_param" value="/path/to/foo" /></span><br style="font-family: courier new,monospace;">



<span style="font-family: courier new,monospace;">  <include filename="${the_param}" /></span><br><span style="font-family: courier new,monospace;"></robot></span><br><br>Is there something obviously wrong here?. I tried grepping the ros codebase for xacro:param occurrences to compare against, but found none.<br>



<br>Adolfo<br><br><div class="gmail_quote">2010/5/26 Adolfo Rodríguez Tsouroukdissian <span dir="ltr"><<a href="mailto:dofo79@gmail.com" target="_blank">dofo79@gmail.com</a>></span><div><div></div><div><br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'd like to ask whether using a xacro parameter value in xacro macros is allowed, because it is not clear from the docs [<a href="http://www.ros.org/wiki/xacro" target="_blank">http://www.ros.org/wiki/xacro</a>]. Consider a simplified version of my file, which fails on ros-latest from binary packages:<br>




<br><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"><xacro:parameter name="the_param" value="1" /></span><br style="font-family: courier new,monospace;">




<br><span style="font-family: courier new,monospace;"><xacro:macro 
name="macro1" ></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  
<foo>${</span><span style="font-family: courier new,monospace;">the_param</span><span style="font-family: courier new,monospace;">}</foo></span><span style="font-family: courier new,monospace;"><br>
</xacro:macro></span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><xacro:macro name="macro2" params="macro2_param" ></span><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">  <mechanicalReduction>${macro2_param}</mechanicalReduction></span><span style="font-family: courier new,monospace;"><br><span style="font-family: courier new,monospace;"></xacro:macro></span></span><br style="font-family: courier new,monospace;">




<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"><xacro:macro1 /></span>                                                            <span style="font-family: courier new,monospace;"><!-- Fails 
--></span><br><span style="font-family: courier new,monospace;"><xacro:macro2 </span><span style="font-family: courier new,monospace;">macro2_param</span><span style="font-family: courier new,monospace;"> ="${</span><span style="font-family: courier new,monospace;">the_param</span><span style="font-family: courier new,monospace;">}" /></span>  <span style="font-family: courier new,monospace;"><!-- Fails 
--></span><br><br><span style="font-family: arial,helvetica,sans-serif;">The two above lines raise a XacroException that states " Property wasn't defined: u'the_param'</span> " when xacro is run. Is this expected behavior?.<br>




<br>TIA,<br><br>Adolfo<br><br clear="all"><br>-- <br>Adolfo Rodríguez Tsouroukdissian, Ph. D.<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com" target="_blank">http://www.pal-robotics.com</a><br>




Tel. +34.93.414.53.47<br>Fax.+34.93.209.11.09<br>
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.<br>





<br>CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited.  If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.<br>






</blockquote></div></div></div>
<br></div></div>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div>