yaml substitution

asked 2016-07-11 03:07:12 -0500

F.Brosseau gravatar image

Hello everyone,

I would like to set a list of map for a node using a yaml file. I see that there is a subst_value in the rosparam tag but I don't know how to use it and how it's working.

What I have at the moment :

In a launch file :

<arg name="site_path" value="$(env PWD)"/>
<rosparam command="load" file="$(env PWD)/map/map_list.yaml" param="$(arg site_path)" subst_value="true" />

In a yaml file :

 foo:
  map_list:
    "map1": "$(arg site_path)/map/map1.map"
    "map2": "$(arg site_path)/map/map2.map"

The result I have :

/absolute/path/to/foo/map_list/map1: $(arg site_path)/map/map1.map
/absolute/path/to/foo/map_list/map2: $(arg site_path)/map/map2.map

What I want :

/foo/map_list/map1: /absolute/path/to/map/map1.map
/foo/map_list/map2: /absolute/path/to/map/map2.map

Is it possible to do that ?

edit retag flag offensive close merge delete

Comments

If you are still interested, have a look at https://github.com/ros/ros_comm/pull/... .

alextoind gravatar image alextoind  ( 2018-03-28 04:05:30 -0500 )edit