# L5 - L6 Introduction to ROS2 Helpful article: Build a ROS 2 Data Pipeline with ROS 2 Topics: https://roboticsbackend.com/build-a-ros2-data-pipeline-with-ros2-topics/ Grading: - Sinusoidal generator node with ROS 2 parameters (amplitude, frequency), based on rclpy/rclcpp timer - 5 pts - Scaler node with a ROS 2 parameter (scale) - 4 pts - Proper ROS 2 package with all files and launchers included - 3 pts - Launcher (Python or XML) with configuration loaded from YAML - 3 pts - Visualization for the proper message format - 2 pts - A few questions about ROS 2 - 3 pts Total sum: 20 pts ## Ubuntu GNU/Linux (recommended) for ROS 2 You have 2 options how to install it on your PC to prepare next exercises: 1. Ubuntu on a separate disk partition, recommended option 2. Ubuntu in the Virtual Machine (system within a system), second best option Any other combination (ROS 2 built from source, ROS 2 with Windows etc.) - do it at your own risk, I won't help you. Ad 2. Several additional notes for using an Ubuntu virtual machine (VM) on VirtualBox (VB) - what to configure during installation (if not the default) and then add to the VM: - VM settings - select Ubuntu 64-bit version, set the memory size to a minimum of 2048.0 MB, use a virtual hard disk with VDI format, and set it to dynamically allocated. - Change the virtual disk size to at least 50 GB (100 GB is recommended for working with Linux with multiple applications, including ROS 2 for robotics, etc.). - After creating the VM with Ubuntu 22.04, go to settings and under "System" > "Processor," change the number of CPUs to a value 1-2 CPUs less than the available "green" maximum (but greater than one). - Another change in "Settings" > "Network" > Adapter attached to: Bridged Adapter, x. Go through the installation process after mounting the Ubuntu 22.04 image, i.e., "Settings" > "Storage" > "[CD/DVD Drive]" > "Optical Drive" > "Choose a disk file" > [e.g., ubuntu-22.04-desktop-amd64.iso], and start the VM. Go through the system installation with third-party software following the instructions (e.g., "Erase disk..." and so on). Several additional changes for more convenient work - enter the following commands in the terminal and confirm with Enter: ```bash sudo apt update sudo apt install build-essential gcc make perl dkms ``` Restart the virtual machine and in its window, go to the "Devices" > "Insert Guest Additions CD image..." and select "Run" in the window that appears. Restart the VM again. Now (again! this is a known VB bug), eject and add (as before) the Guest Additions CD image and go through the installation process. Restart again, and the virtual system window should work better, e.g., scaling to full screen when resizing the window, etc. Don't forget to eject the Guest Additions CD after verifying its functionality in the system. More VM changes - "Devices" > "Shared Clipboard" > "Bidirectional" (for using Ctrl + C / Ctrl + V - please note that in a terminal, you also need to hold Shift for copy/paste). Restart the VM. Now again: ```bash sudo apt update sudo apt upgrade ``` This will give you a reasonably functioning Ubuntu 22.04 system on a virtual machine using VirtualBox. You can now perform a standard full installation of the ROS 2 (recommended: LTS Humble): - ## Different sites with good ROS 2 resources Please check them out for helpful hints for next laboratories. - - - - - - - - - - - - - - -