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

Revision history [back]

click to hide/show revision 1
initial version

I updated the load_yaml function to allow for a package parameter.

I updatedYou apparently only need one set of ${} the load_yaml function per property. So rather than trying to allow for a package parameter.double up with

<xacro:property name="filename" value="$(find package)/file.yaml"/>
<xacro:property name="dictionary" value="${load_yaml(${filename})}"/>

or

<xacro:property name="dictionary" value="${load_yaml($(find package)/filename.yaml)}"/>

like I tried to do, use two different properties, like so:

<xacro:property name="filename" value="$(find package)/file.yaml"/>
<xacro:property name="dictionary" value="${load_yaml(filename)}"/>

The filename will be substituted already since it's already in curly brackets. You don't need two sets.

Thanks to [Robert Haschke] for this answer.