User Tools

Site Tools


infrastructure:schroot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infrastructure:schroot [2021/10/18 09:55] s_fuyedcinfrastructure:schroot [2022/09/01 15:01] (current) stelter
Line 1: Line 1:
 +=====Creating a 20.04 environment with ROS noetic on an 18.04 system======
 +
 From http://wiki.ros.org/ROS/Tutorials/InstallingIndigoInChroot From http://wiki.ros.org/ROS/Tutorials/InstallingIndigoInChroot
  
-This setup is for installing 20.04 alongside an 18.04 system on the same machine, without the need to reboot to a different mounting point. If you want it the other way around (hosting a 20.04 system and creating a 18.04 environment) [[infrastructure/schroot-18.04-on-20.04|go to this page instead]]. To install 20.04 on an 18.04 system instead, replace all mentions of 18.04 with 20.04, 'focal' with 'bionic' and 'melodic' with 'noetic'.+This setup is for installing 20.04 and ROS noetic alongside an 18.04 system on the same machine, without the need to reboot to a different mounting point. If you want it the other way around (hosting a 20.04 system and creating a 18.04 environment) [[infrastructure/schroot-18.04-on-20.04|go to this page instead]].
  
 ===Setup schroot env=== ===Setup schroot env===
Line 16: Line 18:
 </code> </code>
  
-Now put the following settings into it.+Now put the following settings into it. Don't forget to replace your own username at 'users' and to remove the comment after the user name.
  
 <code> <code>
Line 26: Line 28:
 root-groups=root root-groups=root
 root-users=root root-users=root
 +profile=default
 </code> </code>
  
Line 67: Line 70:
 ===Setting up ROS in the environment=== ===Setting up ROS in the environment===
  
-Login to the schroot environment again. We're going to do a full ROS install in here. First get some general archives. Again, remember to change 'noetic' and 'focal' to 'melodic' and 'bionic' if you created a 18.04 environment instead of 20.04.+Login to the schroot environment again. We're going to do a full ROS install in here. First get some general archives.
  
 <code> <code>
Line 75: Line 78:
 </code> </code>
  
-Now for the ROS install do everything you'd usually do to install ROS on your machine. +Now for the ROS install do everything you'd usually do to install ROS on your machine. On this new 20.04 environment we'll need ROS noetic.
  
 <code> <code>
Line 86: Line 89:
 </code> </code>
  
-ROS is now installed in the schroot environment. Now come some python packages for rosdep and build-scripts. For 18.04 stick to the python 2.7 packages like 'python-rosdep' instead of python3-*.+ROS is now installed in the schroot environment. Now come some python packages for rosdep and build-scripts. 20.04 focal needs the python3 packages.
  
 <code> <code>
Line 95: Line 98:
  
  
-===Additional===+===Final touches===
  
-For a little bit more convenience, put the following in your host-machine's bash setup (.bashrc or .bash_profile, as I prefer). Streaming to /dev/null only prevents these calls to produce output. The conditional (== "focal") depends on the name of your environment, which was set in the file at the beginning of this page. Choose "bionic" if the environment was set up for 18.04 bionic.+For a little bit more convenience, put the following in your host-machine's bash setup (.bashrc in the home directory). Streaming to /dev/null only prevents these calls from producing output. The conditional (== "focal") depends on the name of your environment, which was set in the file at the beginning of this page. The PYTHONPATH needs to be reset because focal and bionic use different default versions of python. Also, the ssh-agent needs a restart when the environment changes
  
 <code> <code>
Line 112: Line 115:
  
  
-The following aliases make things bit more convenient.+The following aliases can be used to create persistent schroot session, which you can easily connect to.
  
 <code> <code>
Line 119: Line 122:
 alias stop_noetic='schroot -e -c noetic' # terminates the schroot session alias stop_noetic='schroot -e -c noetic' # terminates the schroot session
 </code> </code>
 +
 +If the following message appears when calling 'start_melodic', a session already exists.
 +<code>
 +Failed to lock chroot: /var/lib/schroot/session/melodic: Failed to write session file: File exists
 +</code>
 +
 +Congratulations, you can now connect to the 20.04 environment from your 18.04 machine. Run packages for noetic while in your 20.04 environment, and those for melodic on your host machine. 
infrastructure/schroot.1634550954.txt.gz · Last modified: 2021/10/18 09:55 by s_fuyedc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki