Remap with <arg> in launch file

asked 2019-02-01 16:19:21 -0500

jmaximoff gravatar image

Hi,

I'm trying to use an arg within a remap tag like this:

<launch>
    <arg name="device_ns" value="$(env DEVICE_NS)" />
    <node name="my_node" pkg="my_pkg" type="my_type" ns="$(arg device_ns)">
        <remap from="$(arg device_ns)/my_topic" to="$(arg device_ns)/another_topic"
    </node>
</launch>

but it doesn't work. If I replace the arg in remap with the hard-coded value like this:

<launch>
    <node name="my_node" pkg="my_pkg" type="my_type" ns="$(arg device_ns)">
        <remap from="/my/device/ns/my_topic" to="/my/device/ns/another_topic"
    </node>
</launch>

it does. Am I doing something wrong here, or does remap not support arg evaluation?

Thanks, Josh

edit retag flag offensive close merge delete