Changing default namespace in ROS2
Hi everyone,
Does anybody know if there is an easy way to set a namespace for all the nodes started by a launch file, and by all the other launch files started from there?
In ROS 1 there was the possibility to change the default namespace by setting the environment variable ROS_NAMESPACE, but from a quick test I found that this is not the case anymore in ROS 2 foxy.
For large systems distributed among many launch files it is quite bothersome to go and set the namespace argument for each node in each of the launch files. And namespace remapping works only with ros run, but not with ros launch.
To give you a concrete example: imagine having several machines all running the same software. They should all communicate their data and accept commands under separate topics, so it would be great to have a simple way to configure a different namespace for each of them.