ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hello @NEET,
My XML File: colors.yaml
color_0: "1 1 1 1.0"
color_1: "0 0 0 1.0"
color_2: "0.84 0 0 1.0"
color_3: "0.55 0.24 1 1.0"
color_4: "0.01 0.53 0 1.0"
For accessing Yaml file data,
<xacro:property name="properties" value="${load_yaml(package + '/<path>/colors.yaml')}"/>
<xacro:property name="color_0" value="${properties['color_0']}"/>
I hope It will work, If you having any issues feel free to drop a comment.
2 | No.2 Revision |
Hello @NEET,
My XML File: colors.yaml
color_0: "1 1 1 1.0"
color_1: "0 0 0 1.0"
color_2: "0.84 0 0 1.0"
color_3: "0.55 0.24 1 1.0"
color_4: "0.01 0.53 0 1.0"
For accessing Yaml file data,
<xacro:property name="properties" value="${load_yaml(package + '/<path>/colors.yaml')}"/>
<xacro:property name="color_0" value="${properties['color_0']}"/>
I hope It will work, If you having any issues feel free to drop a comment. comment.
3 | No.3 Revision |
Hello @NEET,
My XML File: colors.yaml
color_0: "1 1 1 1.0"
color_1: "0 0 0 1.0"
color_2: "0.84 0 0 1.0"
color_3: "0.55 0.24 1 1.0"
color_4: "0.01 0.53 0 1.0"
For accessing Yaml file data,
<xacro:property name="properties" value="${load_yaml(package + '/<path>/colors.yaml')}"/>
<xacro:property name="color_0" value="${properties['color_0']}"/>
OR You can also load Yaml file like this way,
<xacro:property name="properties" value="${load_yaml($(find package)/filename.yaml)}"/>
I hope It will work, If you having any issues feel free to drop a comment.