roslaunch
was not invented for performance reasons, but for convenience.
From wiki/roslaunch:
roslaunch is a tool for easily launching multiple ROS nodes locally and remotely via SSH, as well as setting parameters on the Parameter Server. It includes options to automatically respawn processes that have already died. roslaunch takes in one or more XML configuration files (with the .launch
extension) that specify the parameters to set and nodes to launch, as well as the machines that they should be run on.
In addition to what is written there, roslaunch
also provides a way to easily configure node names, remap topics and refer to files and other resources (using substitution args).
rosrun
has none of this. You could do all of this yourself (in a .bash
script), but that would just mean you'd be spending effort duplicating what a tool can already do for you.
In the end roslaunch
doesn't perform any magic: it resolves locations of binaries (in packages), constructs a command line (including the values of the special keys) and Popen(..)
s them (so to speak).
Seeing #q368557 and your question here: perhaps you could add some words on what made you ask your question(s).
Using
roslaunch
is quite central to a normal workflow in ROS 1.I'm not claiming it's perfect (not at all actually), but I'm curious as to what you've encountered that made you post your question here.
Are you running into some (perceived) limitation perhaps?
As for limitation, the only one is that I wish I could have roslaunch print messages so while I am debugging it I can see what is happening. But xml is so verbose and redundant and unreadable. I want something much simpler for the 90% use case. It doesn't have to be python, it could be json or something else. I could easily imagine this existing. So all my questions are around finding a better way to orchestrate the launch of nodes.
what sort of messages?
For example, printing the value of a param