python API for roslaunch with parameter
I want to run a roslaunch file with parameter, I follow this tutorial:
import roslaunch
uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
cli_args = ['/home/m/catkin_ws/src/rl_nav/launch/nav_gazebo.launch','maze_id:=2']
roslaunch_args = cli_args[1:]
roslaunch_file = [(roslaunch.rlutil.resolve_launch_arguments(cli_args)[0], roslaunch_args)]
parent = roslaunch.parent.ROSLaunchParent(uuid, roslaunch_file)
parent.start()
But when I run this script, there is an error:
TypeError: not all arguments converted during string formatting
Why does it and how can I solve it? Thank you.
Hey, did you ever find a solution for this problem? I am having the same issue. Cheers!
Any update?
I have the same problem. There seems to be discrepancy between the documentation and the code. The code expects a list of strings, but the documentation indicates using a list of tuples of strings.