Rename JOINT_NAMES in ur_driver test_move.py [closed]
I rosrun ur_driver test_move.py
and would like to change the names of the joints which used. Originally they are initialized in the test_move.py, sadly I can't just edit this file, so I would like to find out if I can do this maybe with a launch file.
In test_move.py the joint names are saved in a character array like this:
JOINT_NAMES = ['shoulder_pan_joint','shoulder_lift_joint',...]
The overall question: Can I effect the names of the joints via a launchfile. If yes how and if not, are there other ways to effect it.
My thoughts are about a Launch-File like this:
<node pkg="ur_driver" type="test_move.py" name="follow_joint_trajectory">
<param name="JOINT_NAMES" value="['J0','J1',...]"/>
</node>
EDIT 1: During writing I may already obtained my answer. I need to check at home. If you probably know something important to know about please feel free as to answer me.
I am not sure about how to write value="['J0','J1',...]"
in an exact way. I still get an error.
EDIT 2: So far I tried about and read the information about the <param>
tag, but as I understand it is not changing the variables used within the file. And there was also no reaction yet.
This is my launch file:
<launch>
<arg name="robot_ip" />
<param name="/robot_ip_address" type="str" value="$(arg robot_ip)"/>
<node pkg="industrial_robot_client" type="robot_state" name="robot_state"/>
<node pkg="industrial_robot_client" type="motion_streaming_interface" name="motion_streaming_interface"/>
<node pkg="industrial_robot_client" type="joint_trajectory_action" name="joint_trajectory_action"/>
<node pkg="ur_driver" type="test_move.py" name="follow_joint_trajectory">
<param name="JOINT_NAMES" value="['J0','J1','J2','J3','J4','J5']"/>
<remap from="follow_joint_trajectory/cancel" to="/joint_trajectory_action/cancel"/>
<remap from="follow_joint_trajectory/feedback" to="/joint_trajectory_action/feedback"/>
<remap from="follow_joint_trajectory/goal" to="/joint_trajectory_action/goal"/>
<remap from="follow_joint_trajectory/result" to="/joint_trajectory_action/result"/>
<remap from="follow_joint_trajectory/status" to="/joint_trajectory_action/status"/>
</node></launch>
Is there a way to change this on the fly or do I need to build the test_move.py in a new package with the right names?