Computer Environment
In this course we will assume that you use a computer running Ubuntu 22.04 (with ROS 2 Humble). The reason for choosing 22.04 over 24.04 (with ROS 2 Jazzy), is that 24.04 was released just a couple of months ago (April 25, 2024). Furthermore, the first point-release of 24.04 (i.e., 24.04.1) was delayed due to bugs and released August 29, 2024 (source https://lists.ubuntu.com/archives/ubuntu-devel/2024-August/043079.html Links to an external site.). It is when 24.04.1 is released that users of 22.04 can upgrade to 24.04. As the course starts September 9, this obviously gives us very little time to test that everything is working on 24.04.
Each student attending the course will get to borrow a 500GB Samsung (T5 or T7) SSD with Linux installed on it according to Linux Installation. This allows you to boot into Linux from a PC (not Mac) desktop or laptop. See below for instructions. Many of you will already be using Ubuntu which is great. Note that we only support Ubuntu 22.04 in this course.
The software we provide is written for ROS 2 version Humble. One of the strengths with ROS 2 is that it can also be run on Mac and Windows. You are free to try this but we cannot provide support for it.
A third option is to install Ubuntu 22.04 in a virtual machine. On the Mac we have tested VMware Fusion Links to an external site. which can be used free of charge. We tested Player Version 13.0.2 (21581413). This will be slower but works unless you have a very old Mac. It was tested on a MacBook Pro from 2020 with 2 GHz Quad-Core Intel Core i5 and 32 GB RAM. I assigned 5 cores and 8GB of memory and 50GB disk to it. If you want to try this option but lack space on your machine you can use the external disk as storage. This will require either reformatting the SSD to a format that Mac can read/write to or repartitioning the disk (preferred) so that you can use part of it as general storage. If you do not know how to do this please ask someone. NOTE: If you have a newer Mac it uses the M1/M2 chips which are of arm type which will not allow you to install Webots.
Booting from the external SSD
To start up with the SSD follow these steps
- Make sure the computer is turned off
- Connect the disk to the computer. If you computer is a bit older make sure to connect it to a port that supports USB 3.
- Power on the computer and press whatever button your computer uses for you to be able to specify what device to boot from ("boot menu"). If you connect it to a computer that has not other disk this is probably not necessary.
- On a PC it is often DEL, F1, F2 or F10. For example, on (at least one) Lenovo it is F1. On an Intel NUC it would look like below, where you can press F10 to get to the boot menu where you can select which disk to boot from.
On some systems you need to go into the BIOS where you typically have an entry for the boot menu and the list of devices to boot from. - You most likely see an entry containing UEFI and Samsung (T5 or T7). This is the one you want.
- You most likely do not want to make a permanent change of the boot order so you are looking for a way to specify what to boot from now.
- On a PC it is often DEL, F1, F2 or F10. For example, on (at least one) Lenovo it is F1. On an Intel NUC it would look like below, where you can press F10 to get to the boot menu where you can select which disk to boot from.
Troubleshooting
- Some computers seem very picky about which port you plug your disk into. Try different once if it is not detected.
- On a PC you might end up in the BIOS, go to the Boot section and look for an entry that starts like UEFI Seagate and select that one. If this fails, try to activate CSM/legacy mode and try again, still UEFI.
Restore you SSD
Should you want to restore the SSD to the state you got it in you can use Rescuezilla.
- Prepare a USB stick with Rescuezilla Links to an external site.
- Download the zip-file with the SSD image files Links to an external site. and unpack the folder.
- Boot from the USB stick int Rescuezilla
- Select Restore
- Look for the image files
- Select the Samsung T5/7 to as the destination
Setting up the network
The network settings are available in the top right corner in Ubuntu. As on all systems, setting things up is usually much simpler if you have a network cable to start with unless you have an easy to connect to and fast wireless network.
Down the line, most of you will probably want to connect to eduroam. You need a certificate which your university distributes for you. An attempt has been made below to collect the information for most of your universities below but so far only KTH has been verified. If yours is not there or the link is wrong, help us and provide a link and we will add or update it.
- Chalmers: https://eduroam.no/connect/download/?idp=588;profile=973;os= Links to an external site.
- KTH: https://intra.kth.se/it/natverk/natverk/wifi/eduroam-at-kth-1.610707
- LiU: https://eduroam.no/connect/profiles/?idp=174 Links to an external site.
- Lund: https://eduroam.no/connect/download/?idp=433;profile=1338;os= Links to an external site.
- Umeå: https://eduroam.no/connect/download/?idp=22;profile=8912 Links to an external site.
- Örebro: https://eduroam.no/connect/download/?idp=1251;profile=2235;os= Links to an external site.
Terminal
In the course you will use command line commands in the terminal window a lot. Those of you are not used to that, will be used to it after this course :-)
You can open the terminal by pressing the 3x3-dot symbol in the lower left corner and finding and clicking terminal. We suggest that you make it one of your favorites so that you can access directly in the left hand menu. You do that by right-clicking on the icon in that menu (will be there when you have terminal open) and selecting to make it a favorite in the popup menu or by dragging it above the thin white line.
You will be using many terminals at once and to save space you will probably want to use the tabbing function in the terminal. Pressing the +-sign in the top left corner will open a new tab like in a browser. You can also press ctrl+shift+t for a new tab or ctrl+alt+t for a new terminal window.
You will run programs in the terminal. To kill a program you press ctrl+c in that terminal window.
Change your password
One of the first things you want to do is to change your password so that logging in to your computer is not so easy. Remember that it is not only what is on your computer that is at risk. Getting into your computer means someone has gained access into your network as well.
Open a terminal and type (followed by ENTER)
passwd
This will prompt you for a password and ask you to repeat it. The password has to fulfill some minimum safety requirements. "wasp" does not cut it for example.
Copy-n-paste in Linux
One of the things you do often in any OS is to copy and paste. In Linux you use ctrl+c/v as in many other OS as long as you work with graphical interfaces but when you are in a terminal window you need to also press shift. For example to copy an instruction from the Canvas course page you would use ctrl+c in the browser to copy and then shift+ctrl+v to paste it into a terminal. Make sure that the window you want to copy from or paste into must be active.
Screenshot and screencasts
To take a screenshot or record your screen simply press shift+ctrl+alt+r and a window will pop up that lets you select snapping a single frame or recording a video and you can select a window, a self-defined region, etc. THis will be your friend in some of the assignments.
TAB and ctrl+r
Two power functions that will save you tons of time in a Linux terminal is TAB and ctrl+r.
TAB allows you to list options either all of them or by typing the first characters limiting it to those that match the start of what you typed. For example, if you type ros and press TAB it will tell you all completions of commands that start with ros. If you type ros2 r and press TAB it will complete ros2 run since that is the only available completion (on my system at least). If you press TAB again it will then tell you what packages are available. If there are few it will list them all immediately but if there are many it will prompt you to say OK to listing them.
TAB saves time but you still need to press many buttons. In many cases you will want to execute exactly the same command again and then ctrl+r is your friend. Press ctrl+r and type the string you want to search for. If you press ctrl+r you will move to the next search result. Searching for ros2 is most likely much worse than something more unique for the specific ros2 command line you are looking for.
Changing keyboard layout
Assuming that you have multiple keyboard layouts installed you can easily switch between them by pressing Windowkey+SPACE.
Text editor
We have installed a few different text editors for you. Use the terminal window to try the following and see if one of them suits you
- code ("vscode" aka MIcrosoft's Visual Studio Code)
- gedit
- subl
- xemacs
- gvim
The first of these comes preinstalled but feel free to use whatever you like.