User Tools

Site Tools


infrastructure:schroot-18.04-on-20.04

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-18.04-on-20.04 [2021/10/18 10:05] s_fuyedcinfrastructure:schroot-18.04-on-20.04 [2021/10/20 11:58] (current) hassouna
Line 3: Line 3:
 From http://wiki.ros.org/ROS/Tutorials/InstallingIndigoInChroot From http://wiki.ros.org/ROS/Tutorials/InstallingIndigoInChroot
  
-This setup is for installing an 18.04 environment on a 20.04 host system. If you want it the other way around (hosting an 18.04 system and creating a 20.04 environment) go back to [[infrastructure/schroot|this page instead]].+This setup is for installing an 18.04 environment with ROS melodic on a 20.04 host system. If you want it the other way around (hosting an 18.04 system and creating a 20.04 environment) go back to [[infrastructure/schroot|this page instead]].
  
 ===Setup schroot env=== ===Setup schroot env===
Line 12: Line 12:
 </code> </code>
  
-Describe the new environment to build (in this case its 18.04 bionic). Open a new conf file first.+Describe the new environment to build (in this case its 18.04 bionic). Open a new conf file first. Here gedit is used, feel free to use your favorite editor instead.
  
 <code> <code>
Line 18: Line 18:
 </code> </code>
  
-Now put the following settings into it.+Now put the following settings into it. Don't forget to put the username of your host machine as users.
  
 <code> <code>
Line 25: Line 25:
 type=directory type=directory
 directory=/srv/chroot/bionic directory=/srv/chroot/bionic
-users=cram ## put the username of your host-machine here+users=cram ## put the username of your host machine here
 root-groups=root root-groups=root
 root-users=root root-users=root
Line 69: Line 69:
 ===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. Since it is an 18.04 bionic environment we are installing ROS melodic.+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 77: Line 77:
 </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. Since it is an 18.04 bionic environment we are installing ROS melodic.
  
 <code> <code>
Line 97: Line 97:
  
  
-===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 (== "bionic") depends on the name of your environment, which was set in the file at the beginning of this page.+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 (== "bionic") 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 114: Line 114:
  
  
-The following aliases make things bit more convenient.+The following aliases allow you to create persistent schroot session, which you can connect to easily.
  
 <code> <code>
Line 121: Line 121:
 alias stop_melodic='schroot -e -c melodic' # terminates the schroot session alias stop_melodic='schroot -e -c melodic' # 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 18.04 environment from your 20.04 machine. Run packages for melodic while in your 18.04 environment, and those for noetic on your host machine. 
infrastructure/schroot-18.04-on-20.04.1634551545.txt.gz · Last modified: 2021/10/18 10:05 by s_fuyedc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki