Short answer: yes, as long as the packages for that ROS version have been released for your OS.
See REP-3 for which ROS versions have been released for which OS.
My doubt is can I do the following?
sudo apt-get install ros-kinetic-desktop-full
sudo apt-get install ros-indigo-desktop-full
No, because as you can see in REP-3
, there is no overlap in the OS supported by Indigo and Kinetic.
You could install Kinetic next to Lunar, as they both support Ubuntu Xenial.
Is it safe to install multiple distributions?
I'm not sure what the question is: what do you define as 'safe'? No packages from one ROS distribution should overwrite any files from others (that is enforced by apt
), if that is what you are worried about.
Any extra precautions to take?
Don't try to source
the setup.bash
of both and expect to be able to mix-and-match packages. As long as you keep things separated, you should be fine.
Edit: I should've closed this question, as there are way too many duplicates of it already:
- #q187548: Can I install multiple ROS version on the same machine?
- #q189567: two ROS versions in the same time
- #q103116: Working with two ROS Versions on single system
- #q10660: What happened if I install two version of ROS?
- #q76279: Different ROS versions on multiple machines
- #q58221: How I manage multiple ros distributions
- #q243347: Can I install dual ROS version on the same machine?
and so on.