ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the command attribute to the <param> tag (documented here: http://wiki.ros.org/roslaunch/XML/param ) to run a command and set a parameter to the result.

If you have a script in my_pkg called create_directory.sh that creates the directory and prints the directory name, you can set the parameter with:

<param name="dataDumpFolder" command="$(find my_pkg)/create_directory.sh"/>

Note that your script will be called once for each <param> tag, so you probably want to make this a global parameter.