infrastructure:schroot-18.04-on-20.04
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
infrastructure:schroot-18.04-on-20.04 [2021/10/18 09:57] – created s_fuyedc | infrastructure:schroot-18.04-on-20.04 [2021/10/20 11:58] (current) – hassouna | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====Creating an 18.04 environment with ROS melodic on a 20.04 system====== | ||
+ | |||
From http:// | From http:// | ||
- | 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/ | + | This setup is for installing an 18.04 environment |
===Setup schroot env=== | ===Setup schroot env=== | ||
Line 10: | Line 12: | ||
</ | </ | ||
- | Describe the new environment to build (in this case its 20.04 focal). 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. |
< | < | ||
- | sudo gedit / | + | sudo gedit / |
</ | </ | ||
- | 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. |
< | < | ||
- | [focal] | + | [bionic] |
- | description=ubuntu | + | description=ubuntu |
type=directory | type=directory | ||
- | directory=/ | + | directory=/ |
- | 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 31: | Line 33: | ||
< | < | ||
- | sudo mkdir -p / | + | sudo mkdir -p / |
</ | </ | ||
Initialize the new environment. This will install the base system of the desired OS. | Initialize the new environment. This will install the base system of the desired OS. | ||
< | < | ||
- | sudo debootstrap --variant=buildd --arch=amd64 | + | sudo debootstrap --variant=buildd --arch=amd64 |
</ | </ | ||
Line 47: | Line 49: | ||
Change the environment to the new root. | Change the environment to the new root. | ||
< | < | ||
- | sudo schroot -c focal | + | sudo schroot -c bionic |
</ | </ | ||
Line 62: | Line 64: | ||
< | < | ||
exit | exit | ||
- | schroot -c focal | + | schroot -c bionic |
</ | </ | ||
===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 ' | + | Login to the schroot environment again. We're going to do a full ROS install in here. First get some general archives. |
< | < | ||
- | sudo sh -c 'echo "deb http:// | + | sudo sh -c 'echo "deb http:// |
- | sudo sh -c 'echo "deb http:// | + | sudo sh -c 'echo "deb http:// |
- | sudo sh -c 'echo "deb http:// | + | sudo sh -c 'echo "deb http:// |
</ | </ | ||
- | 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. |
< | < | ||
Line 83: | Line 85: | ||
curl -s https:// | curl -s https:// | ||
sudo apt update | sudo apt update | ||
- | sudo apt install ros-noetic-desktop-full | + | sudo apt install ros-melodic-desktop-full |
</ | </ | ||
- | 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 | + | ROS is now installed in the schroot environment. Now come some python packages for rosdep and build-scripts. For 18.04 stick to python 2.7 packages, which is the default on bionic systems. |
< | < | ||
- | sudo apt install | + | sudo apt install |
sudo rosdep init | sudo rosdep init | ||
rosdep update | rosdep update | ||
Line 95: | Line 97: | ||
- | ===Additional=== | + | ===Final touches=== |
- | For a little bit more convenience, | + | For a little bit more convenience, |
< | < | ||
- | if [[ ${SCHROOT_CHROOT_NAME} == "focal" ]]; then | + | if [[ ${SCHROOT_CHROOT_NAME} == "bionic" ]]; then |
- | echo " | + | echo " |
- | unset PYTHONPATH | + | unset PYTHONPATH |
- | source /opt/ros/noetic/setup.bash > /dev/null | + | source /opt/ros/melodic/setup.bash > /dev/null |
eval `ssh-agent -s` > /dev/null | eval `ssh-agent -s` > /dev/null | ||
else | else | ||
- | echo " | + | echo " |
- | source /opt/ros/melodic/setup.bash | + | source /opt/ros/noetic/setup.bash |
fi | fi | ||
</ | </ | ||
- | The following aliases | + | The following aliases |
< | < | ||
- | alias noetic=' | + | alias melodic=' |
- | alias start_noetic=' | + | alias start_melodic=' |
- | alias stop_noetic=' | + | alias stop_melodic=' |
</ | </ | ||
+ | |||
+ | If the following message appears when calling ' | ||
+ | < | ||
+ | Failed to lock chroot: / | ||
+ | </ | ||
+ | |||
+ | Congratulations, |
infrastructure/schroot-18.04-on-20.04.1634551058.txt.gz · Last modified: 2021/10/18 09:57 by s_fuyedc