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 create a script that takes the name of the file as a parameter and forms the correct roslaunch call with the full path. So, if you have a package "mypackage", a launchfile "test.launch", than you could create a script mypackage/scripts/helper.bash :

#!/bin/bash

if [ "$1" != "" ]; then
  echo "Full path to the file:"
  echo "$PWD/$1"

  roslaunch mypackage test.launch file:="$PWD/$1"
else 
  echo "$0: file not specified"
fi

If you want to pass the filename "filename" from the local directory you could use the following command :

rosrun mypackage helper.bash filename