Ask Your Question

Revision history [back]

Negative values in launch file arguments

Hello everyone,

roslaunch can't read negative argument.

I'm launching my node via this launch file:

<launch>
    <arg name="inc" default="-0.02"/>
    <node pkg="parameter_analyzer" type="kld_err" name="parameter_analyzer" output="screen">
        <param name="increment" value="$(arg inc)"/>
    </node>
</launch>

Output:

[ INFO] [1461752716.797017994, 13371.605000000]:  INCREMENT VALUE: 0

If parameter is set to positive, output:

[ INFO] [1461752338.872513841, 13012.430000000]: INCREMENT VALUE: 0.02

Any suggestions? Thanks.

Negative values in launch file arguments

Hello everyone,

roslaunch can't read negative argument.

I'm launching my node via this launch file:

<launch>
    <arg name="inc" default="-0.02"/>
    <node pkg="parameter_analyzer" type="kld_err" name="parameter_analyzer" output="screen">
        <param name="increment" value="$(arg inc)"/>
    </node>
</launch>

Output:

[ INFO] [1461752716.797017994, 13371.605000000]:  INCREMENT VALUE: 0

If parameter is set to positive, output:

[ INFO] [1461752338.872513841, 13012.430000000]: INCREMENT VALUE: 0.02

Any suggestions? Thanks.