Setup procedure for local ROS2 installation.
Robotic Operating System 2 (ROS2) is a software package for developing sofware systems for advance robots. MASLAB relies on ROS2 to facilitate writing custom robotic applications and using other publicly available ROS2 software packages in rapid robot development. ROS2 runs natively on Ubuntu Linux 24.04. For more information about ROS2, please visit: https://www.ros.org/ to learn more!
If you are not already using Ubuntu 24.04, using virtual machine software to install and run Ubuntu on your computer is recommended for flexibility and ease of installation. Below is the instruction to set up Ubuntu on using VirtualBox.
- Download VirtualBox at: https://www.virtualbox.org/wiki/Downloads.
Important
Download BOTH VirtualBox platform packages for your operating system AND VirtualBox Extension Pack.
- Once both are downloaded, run the VirtualBox platform package installation file and follow through the software installation system to install Virtualbox.
- Once VirtualBox installation is finished, open the VirtualBox Extension Pack to install extension pack.
- Download Ubuntu 24.04 installation .iso file.
- For Intel / AMD processor (Windows and older generation Mac): https://ubuntu.com/download/desktop
- For Mac with M processors: https://cdimage.ubuntu.com/noble/daily-live/current/noble-desktop-arm64.iso
Important
Download Ubuntu 24.04.x LTS. NOT Ubuntu 24.10
- After downloading Ubuntu install file, follow this video to install Ubuntu on VirtualBox: https://www.youtube.com/watch?v=yw9c991-4KE
Note
Recommended settings:
- 30Gb storage
- At least 4Gb memory and at most half your computer's memory
VirtualBox Guest Additions enables drag-and-drop from your computer to virtual Ubuntu and better graphic supports. To install:
- Log in and follow through the welcome screen.
- Open
Terminal
by pressingCtrl+Alt+T
orControl+Option+T
- Run the following commands:
sudo apt update sudo apt install -y build-essential dkms linux-headers-$(uname -r)
Tip
Sudo
allow you to install / modify system files thus requires entering your password. Ubuntu terminal does not show typing while entering password to password for <user>:
prompt. Just keep typing the password and hit Return/Enter
to submit password.
-
Press
Enter
to close the opened terminal when installation finishes. -
Click
Devices
and enableShared Clipboard
to copy and paste andDrag and Drop
to drag files between your main computer environment and the virtual Ubuntu.
-
Restart by clicking top right corner > power button and select
Restart...
For better experience in virtual Ubuntu, make the following changes to the virtual machine settings.
-
Turn off Ubuntu by clicking top right corner > power button and select
Power Off...
-
In VirtualBox manager, select the virtual machine and click the
Settings
gear.
-
Switch from
Basic
toExpert
mode. -
Select
System
and make sure processors count is at least 2 with 100% execution cap.
-
Select
Display
and make sure video memory is maxed out at 128MB. If you are using Windows or older generation Mac, enable 3D Acceleration in Extended Features.
Warning
3D acceleration may not work for all devices. If Ubuntu does not boot after enabling 3D acceleration, disable it and try again.
-
Select
USB
and make sure USB Controller is enabled and set to USB 3.0.
-
Click
Ok
to save the settings.
MASLAB staffs have prepared a script to automatically install and setup your Ubuntu installation for ROS 2. To use the script:
- Open
Terminal
- Run the following commands:
wget https://raw.githubusercontent.com/MASLAB/ros2-setup/refs/heads/main/setup.sh chmod +x ./setup.sh && ./setup.sh
- Enter your team's number and press
Enter
to start installation progress. Enter password if necessary.
Warning
Please enter your team NUMBER only. (ex: 1, 2, 12)
- Once installation is finished, try playing with ROS 2 with the FizzBuzz tutorial at: https://github.com/MASLAB/ROS2_FizzBuzz
For manual installation and setup, refer to ROS 2 online documentation at: https://docs.ros.org/en/jazzy/