If I specify /opt/ros/foxy as the install destination, won’t it overwrite the system setup.bash?
I don’t want it to create setup.* files, I just want it to install to /opt/ros/foxy/lib/, /opt/ros/foxy/share/, etc.
Personally I feel like the whole cd ~/dev_ws/; source install/setup.bash, etc. is really not a good way to deploy production ROS nodes, I find it much more stable to install everything to /opt/ros, put the launch file in /etc/robot.launch, and run the launch file as a systemd service. It feels much cleaner that way in production than having a bunch of colcon/catkin “crap” lying around the home directory of a user. For production hardware I’d generally want home directories to be empty.
The other reason I do this is that there are often several packages I’m working on, say pkga, pkgb, pkgc, and I have stable versions and unstable (dev) versions of all of them in progress, and I want to create 3 different dev workspaces, dev_ws_a, dev_ws_b, dev_ws_c that each run the stable versions of all packages /except/ use the unstable version of the respective pakcage that is being worked on in that dev workspace. So for example, in dev_ws_a/src I would clone the latest dev branch of pkga but clone nothing else; the system would automatically fall back to the /opt/ros (stable) versions of pkgb and pkgc if I’m working out of dev_ws_a. And then when I want to do some work on pkgb but isolating my work to pkgb and using the stable version of pkga I would switch to dev_ws_b and do some work there.
For this kind of setup to be clean and easy, I would want all stable versions installed to /opt/ros, otherwise the dev workspaces become a mess.