roslaunch parameter has additional newlines when set using command=

asked 2015-10-01 03:08:45 -0600

Felix Duvallet gravatar image

I'm trying to set a ROS parameter in a launch file. The parameter is the file path to some resource, so that it can be used by the node later:


    <param name="filename"
     command="$(find param_pkg)/scripts/"

The python script finds the file and prints its location:

#! /usr/bin/python

The python script works fine, and just prints the file location (with no additional whitespace):

$ rosrun param_pkg


However, the parameter set by the launch file gets a trailing newline and some additional ticks:

$ rosparam get /filename



(note the two lines.) If I set the parameter manually (value=), there are no additional ticks or whitespace: $ rosparam get filename_manual:


Why is this whitespace present only when I set the roslaunch parameter by running a python command, and how can I get it to be the same value as manually setting the param value?

edit retag flag offensive close merge delete