how to launch program out-side ros package from launch file
Are there any way to start a program in /usr/local/bin from launch file?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Are there any way to start a program in /usr/local/bin from launch file?
I don't think there is a direct way to achieve this. But you could easily write a wrapper script and put it into a ros package. The script could look like this:
#!/bin/bash
exec $1 ${@:2}
A corresponding launch entry, assuming that the script is called launch_system_cmd.sh
and lies in package mypackage
, would look like this:
<node name="shell_cmd" type="launch_system_cmd.sh" pkg="mypackage"
args="/bin/echo foo" />
Please note that roslaunch will pass an additional parameter that sets the name for nodes and if necessary topic remappings. The output of the above command should be something like
foo __name:=shell_cmd
You might need to extend the wrapper script to get rid of those additional parameters.
Hi, you can make sure an executable is found via the ros package mechanism by creating links to the programs you need in a ros package.
Maybe you can also use ROS_LOCATIONS
Asked: 2011-06-09 16:26:43 -0500
Seen: 423 times
Last updated: Jun 10 '11
gazebo is not starting and i have no errors
rosbuild_add_roslaunch_check fails for included files using launch file arguments
rosrun error FileNotFoundError: [Errno 2] No such file or directory
launching ros launch file from program
Conditionally set an arg in launch if directory exists
Unable to select model argument for urdf-tutorial package
Running 2 different cameras using usb_cam & Roslaunch
ERROR: cannot launch node of type : can't locate node in package