
Hello,
After digging for a while, I believe it's not possible to set the arguments using the API.
There are related questions in this forum and seems that the users are using python subprocess to do that:
https://answers.ros.org/question/198910/how-to-set-args-with-python-roslaunch/
https://answers.ros.org/question/265796/parameters-roslaunch-from-python-script/
There's a page in ROS wiki as example, but without arguments:
http://wiki.ros.org/roslaunch/API%20Usage
If you want to check by yourself, here goes the API page that refers to the launch object used in a ROS wiki:
http://docs.ros.org/indigo/api/roslaunch/html/roslaunch.parent.ROSLaunchParent-class.html
Fortunately, there's a Pull Request that proposes a solution to that issue:
https://github.com/ros/ros_comm/pull/1115
I hope it can help you!
Originally posted by marcoarruda with karma: 541 on 2017-10-02
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Felix Widmaier on 2017-10-04:
Thanks for linking the pull request, I did not find that one.
Comment by Felix Widmaier on 2018-05-30:
Update: The linked pull request is merged for lunar (not backported to previous versions, though)