How to set parameters names for python nodes in roslaunch
I am trying to automate a rosrun
into a roslaunch
. My command is shown below:
rosrun robotiq_2f_gripper_control Robotiq2FGripperRtuNode.py /dev/ttyUSB0
Problem:
I can not find a way to pass my argument as a parameter. The source code uses sys.argv[1]
as the command line parameter. Is there a way to make this work in a launch file?
This is what I tried:
<launch>
<node pkg="robotiq_2f_gripper_control" type="Robotiq2FGripperRtuNode.py" name="Robotiq2FGripperRtuNode" output="screen">
<param name="device" value="/dev/ttyUSB1" />
</launch>
However, the execution is similar to mistyping the name of the device port in the rosrun
command. I can edit the source code. Furthermore, I know that I could call the rosrun
command in a .sh
script, but I would appreciate using the proper tool for the job.
Offending package: TAMS-Group/robotiq