ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Same error happens in Melodic as well. Since you don't pass any launch arguments, you can just simply start the launch file in a similar way as specified in wiki:
import rospkg
rospack = rospkg.RosPack()
...
launch_path = rospack.get_path('symeter2') + '/symeter2_nav.launch'
cli_args = [launch_path]
roslaunch_file = roslaunch.rlutil.resolve_launch_arguments(cli_args)
launch = roslaunch.parent.ROSLaunchParent(uuid, roslaunch_file)
I believe this same solution works for Lunar as well.
For the people who receive this error when trying to launch multiple launch files at the same time, there seems to be error in wiki. As suggested by @kawa, changing
roslaunch_file = roslaunch.rlutil.resolve_launch_arguments(cli_args)
to
roslaunch_file = roslaunch.rlutil.resolve_launch_arguments(cli_args)[0]
helped me to solve the error.