Before You Begin: Setting Up Ubuntu 22.04 for ROS2 Robotics Development - madibabaiasl/kinematics-robotic-arms-modern-approach GitHub Wiki

Important Notes Before You Begin

  • Make sure to back up any important files before proceeding.
  • Before you begin, take a moment to review the risks and follow the steps closely.
  • If you’re unsure at any point, getting support from someone experienced, such as SLU’s ITS, can be helpful. Move forward once you’re comfortable.

Learning Objectives

  • Prepare a computer for robotics development by installing Ubuntu 22.04 as a primary operating system.
  • Develop familiarity with Linux file navigation, package management, and the Ubuntu Terminal.
  • Troubleshoot common installation issues (Secure Boot, driver problems, update errors).

Learning Outcomes

By the end of this lesson, you will be able to:

  • Successfully install Ubuntu 22.04, verify updates, and operate basic Terminal commands.
  • Explain why Linux is preferred for ROS 2 and robotics research.
  • Demonstrate confidence using the command line for software installation and system management.
  • Resolve common configuration issues through systematic debugging.

Why This Matters

Linux and ROS 2 form the ecosystem where modeling, computation, and control come alive. Students who master this foundation can focus on higher-level robotics tasks (forward kinematics, motion planning, control) without fighting unstable tools later.

Installing Ubuntu 22.04

Video Tutorial: https://youtu.be/C51S9C1KO1Q

To control our robot arm, we need to install the Robot Operating System (ROS), specifically the ROS2 Humble distribution. ROS works better with Linux-based operating systems like Ubuntu, and the version of Ubuntu depends on the ROS distribution. ROS2 Humble works with Ubuntu 22.04, and we need to install it on our computer. We will install it as a standalone operating system, rather than using virtual machines, to avoid the speed and quality issues that arise from virtualization. Ubuntu is an open-source operating system that is very suitable for robotics applications.

What you need:

  • a fast USB of at least 12 GB of space.
  • a computer running Windows

Steps to install Ubuntu 22.04

  • First, check if your hardware is Ubuntu Certified (I used Dell Precision 7780 with Core i9 and 64 GB of RAM):

https://ubuntu.com/certified?q=&limit=20&category=Desktop&category=Laptop

  • The first thing you should do is to go to this website and download Ubuntu’s desktop version and save it to your computer: https://releases.ubuntu.com/jammy/

  • Then you should create a live USB disk. For this, you will need software to flash. There are different software out there but I personally used balenaEtcher. Go to the following website and download and install it: https://etcher.balena.io/

  • Now insert your USB drive, and open up balenaEtcher and flash your disk from the file that you downloaded from the Ubuntu website. And Voila you now have a live USB.

  • Now boot your system with this USB (if it did not start automatically, on Windows you can press the F12 key) and choose Install Ubuntu 22.04. Follow the instructions on the screen to install Ubuntu.

  • After installation is complete, do not forget to update. There are two ways to do this:

    • Do this through the software updater app or
    • Update it by opening the Terminal (Ctrl + Alt + T) and then typing: sudo apt update
  • Then check for updates to apply them by typing: sudo apt upgrade

Ubuntu Terminal is a command-line interface (CLI) that comes pre-installed with the Ubuntu operating system and other Ubuntu-based Linux distributions. It allows users to interact with the system and execute various commands to perform tasks, manage files, configure settings, and more, all through text-based commands. You can open it by typing Ctrl + Alt + T.

Key features and aspects of the Ubuntu Terminal include:

  • File Navigation: Users can navigate the file system and access directories and files using commands like cd (change directory) and ls (list directory contents). For example, if we are in the home directory and we want to go to the music directory we type: cd Music, and cd .. goes back to the home directory. You can create a new folder in the selected directory by typing: mkdir [name]. You can also do this like what we do in other operating systems and using the GUI. You can also create a text file in the Music directory by typing: touch mah.txt.
  • Package Management: Ubuntu Terminal utilizes package managers like APT (Advanced Package Tool) to install, update, and remove software packages. Users can use commands like apt-get or apt for package management tasks. We used this before to install and update the Ubuntu.

If you happen to mess up with Ubuntu and want to uninstall it to re-install it, follow the instructions in the video below:

https://youtu.be/oLksdgBj2fI

Possible Challenges

Challenge: Secure Boot issue in some laptops/desktops. For Dell laptops/desktops and some other brands we encountered an issue of difficulty installing Ubuntu and in some cases difficulty in restarting and shutting down the system.

Solution: For the problem of difficulty in restarting and shutting down, we noticed that these laptops have Secure Boot setup enabled in their BIOS, and that prevents the Ubuntu from booting properly. We disabled this option and some other boot options in the system BIOS. For example, for some Dell computers, the following article can be helpful:

https://www.dell.com/support/kbdoc/en-us/000131655/how-to-install-ubuntu-linux-on-your-dell-pc#Do_you_need_to_Install_Ubuntu_on_your_Dell_PC

For the problem of difficulty in installing Ubuntu, we reinstalled it using the "Safe Graphics" option, and that solved the issue.

Challenge: The wrong time and date on the computer prevented Ubuntu from updating and upgrading!

Solution: This was a weird problem, and the solution, as you may guess, is to correct the system's time and date.