Parse error when using a xacro property loaded through a yaml file.
Environment: Ubuntu 16, ROS Kinetic.
I have a robot_parameters.yaml file with robot parameters: wheel_separation : 0.235 PI : 3.142
In a xacro file I have:
<?xml version="1.0"?>
<robot name="robot_name" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:property name="PI" value="${load_yaml('robot_parameters.yaml')}" />
<link name="left_front_wheel_link">
<visual>
<origin xyz="0.123 0.456 0.101" rpy="${PI/2} 0 0" />
<geometry>
<cylinder radius="0.101" length = "0.0254"/>
</geometry>
</visual>
</link>
</robot>
When I do a --check-order on the xacro, I get the following error:
unsupported operand type(s) for /: 'dict' and 'int'
when evaluating expression 'PI/2'
XacroException(None,)
How would I use an imported name(in this case, PI) via yaml and use it for xacro calculations.