Calling a rosservice with args from a launch file
Hello there ! Hope u are doing well,
I'm trying to call a rosservice directly from a launch file, i used this questions to write my own node and it turned out like that:
<node pkg="rosservice" type="rosservice" name="chg_ctrl" args="call --wait /controller_manager/switch_controller
start_controllers:[joint_group_vel_controller]
stop_controllers:[scaled_pos_joint_traj_controller]
strictness:1
start_asap:false
timeout:0.0" />
It is almost working because i get this message:
ERROR: Incompatible arguments to call service:
Field [start_controllers] must be a list or tuple instead of: str
Provided arguments are:
* start_controllers:[joint_group_vel_controller] (type str)
* stop_controllers:[scaled_pos_joint_traj_controller] (type str)
* strictness:1 (type str)
* start_asap:false (type str)
* timeout:0.0 (type str)
Service arguments are: [start_controllers stop_controllers strictness start_asap timeout]
I tried a couple of things and I can't get rid of this error, did anyone already tried someting like that ?