CodeTheRobot

Course 01 · Free

Ubuntu Linux for Robotics

A nine-phase path from your first Ubuntu terminal to deploying complete ROS 2 robots: Linux basics, developer workflows, robotics tooling, ROS 2 installation and development, simulation, perception, Nav2 and professional-level robotics.

Duration
96 lessons · 9 phases · self-paced
Prerequisite
None
Pixel-art Ubuntu robotics workstation with a laptop and tools
SYSTEM SETUP
Course 01

Learning outcomes

What you will be able to do

  • Use the Ubuntu terminal, filesystem, packages, permissions and processes with confidence
  • Manage services, SSH, disks, udev rules, shell scripts and Git like a developer
  • Set up build tools, Python, the C++17 toolchain, Docker, DDS networking and sensor drivers
  • Install ROS 2 Lyrical Luth, create workspaces and use the ros2 command line
  • Develop, simulate and give robots perception and Nav2 navigation on Ubuntu
  • Deploy real robots on Jetson, NUC and Raspberry Pi with real-time and safety practices

Course outline

Lessons in order

  1. Phase 1 — Linux Basics (Absolute Beginner → Comfortable User)
  2. 01

    What Linux is and why robotics uses it

    The kernel, distributions, open source, and why ROS 2 and robot computers run Linux.

    Open lesson
  3. 02

    Installing Ubuntu LTS (22.04 and 26.04)

    Choosing a release, verifying the image, dual boot vs dedicated disk, and the first update.

    Open lesson
  4. 03

    The Linux filesystem: /home, /etc, /usr, /opt, /var and /dev

    One tree, no drive letters, and what each top-level folder is for.

    Open lesson
  5. 04

    Navigating: pwd, ls and cd

    Where am I, what is here, and how to move; absolute and relative paths, and tab completion.

    Open lesson
  6. 05

    Files and folders: mkdir, cp, mv and rm

    Creating, copying, moving and deleting safely, with -r, -i and -p.

    Open lesson
  7. 06

    Package management with APT

    sudo apt update, apt install, apt remove, searching and reading package information.

    Open lesson
  8. 07

    File permissions: chmod, chown and sudo

    Read, write and execute for user, group and others; octal modes; ownership; when sudo is right.

    Open lesson
  9. 08

    Text editors: nano, vim and gedit

    Editing files in the terminal and on the desktop, saving, quitting and switching.

    Open lesson
  10. 09

    Environment variables: PATH, .bashrc and .bash_profile

    Variables, export, PATH lookup, startup files and sourcing ROS from .bashrc.

    Open lesson
  11. 10

    Processes and system monitoring: ps, top, htop and kill

    Finding running programs, watching CPU and memory, and stopping a process safely.

    Open lesson
  12. 11

    Networking basics: IP, UDP and multicast

    Addresses, ports, TCP vs UDP, multicast groups and why ROS 2 discovery depends on them.

    Open lesson
  13. Phase 2 — Intermediate Linux (Developer Level)
  14. 12

    Systemd services

    Units, systemctl, journalctl and writing a service that starts your robot at boot.

    Open lesson
  15. 13

    SSH: remote access

    Logging in to a robot, keys instead of passwords, the config file and port forwarding.

    Open lesson
  16. 14

    SCP and SFTP: file transfer

    Copying files and folders to and from a robot with scp, sftp and rsync.

    Open lesson
  17. 15

    Disk management

    lsblk, df, du, partitions, filesystems and finding what fills a disk.

    Open lesson
  18. 16

    Mounting USB devices

    Finding the device, mounting and unmounting safely, and permanent mounts in fstab.

    Open lesson
  19. 17

    udev rules for sensors and robots

    Stable device names, permissions and symlinks for serial adapters, lidars and cameras.

    Open lesson
  20. 18

    Bash scripts: shebang, variables and arguments

    Writing a script, #!/bin/bash, making it executable, variables, arguments and exit codes.

    Open lesson
  21. 19

    Shell scripting: loops and conditions

    if, test, for, while, case, functions and reading command output.

    Open lesson
  22. 20

    Aliases and productivity tools

    Aliases, functions, history search, tmux and small habits that save hours.

    Open lesson
  23. 21

    Git and GitHub

    Repositories, commits, branches, remotes, .gitignore and the everyday workflow.

    Open lesson
  24. 22

    Using VS Code on Linux

    Installing, extensions for C++, Python and ROS, remote SSH, tasks and debugging.

    Open lesson
  25. Phase 3 — Linux for Robotics (Professional Level)
  26. 23

    Installing build tools: build-essential, cmake and colcon

    The compiler, make, CMake and the colcon build tool, and checking their versions.

    Open lesson
  27. 24

    Installing Python tools: pip and virtual environments

    python3, pip, venv, why not to pip install system-wide, and Python with ROS 2.

    Open lesson
  28. 25

    Installing the C++17 toolchain: g++ and clang

    Compiler versions, -std=c++17, warnings, clang and clang-tidy, and switching compilers.

    Open lesson
  29. 26

    Installing ROS 2 dependencies: rosdep and vcstool

    Resolving system dependencies from package.xml and cloning many repositories from a .repos file.

    Open lesson
  30. 27

    Understanding DDS networking: Fast DDS and Cyclone DDS

    Choosing an RMW, domains, interfaces and reading discovery problems.

    Open lesson
  31. 28

    Firewall and multicast configuration

    ufw rules for DDS ports, multicast on Wi-Fi and checking that packets flow.

    Open lesson
  32. 29

    Docker basics

    Images, containers, running commands, mounting folders and ROS 2 images.

    Open lesson
  33. 30

    Deploying containers on Linux

    Dockerfiles, compose, restart policies, updates and keeping robot images small.

    Open lesson
  34. 31

    GPU support on Jetson and desktop GPUs

    NVIDIA drivers, JetPack, checking the GPU, and CUDA in containers.

    Open lesson
  35. 32

    RealSense and LiDAR drivers

    Installing sensor drivers, USB permissions, checking data and ROS 2 driver nodes.

    Open lesson
  36. Phase 4 — ROS 2 Installation & Workspace Setup
  37. 33

    Add the ROS 2 apt repository

    Locale, universe, the ros2-apt-source package and the signing key.

    Open lesson
  38. 34

    Install ROS 2 Lyrical Luth

    Desktop vs ros-base, ros-dev-tools, upgrading and what gets installed.

    Open lesson
  39. 35

    Source the ROS 2 environment

    setup.bash, what sourcing changes, per-terminal scope and adding it to .bashrc.

    Open lesson
  40. 36

    Create a ROS 2 workspace

    mkdir -p ~/ros2_ws/src, cloning packages into src and the workspace layout.

    Open lesson
  41. 37

    Build with colcon

    colcon build, options, reading the output and running your first executable.

    Open lesson
  42. 38

    Overlay workspaces

    Underlay and overlay, sourcing order, shadowing packages and checking which one is used.

    Open lesson
  43. 39

    ROS 2 environment variables

    ROS_DISTRO, ROS_DOMAIN_ID, RMW_IMPLEMENTATION, ROS_LOCALHOST_ONLY and logging variables.

    Open lesson
  44. 40

    ROS 2 command-line tools

    ros2 topic list, ros2 node info, ros2 service call, and other everyday commands.

    Open lesson
  45. 41

    Installing ROS 2 packages

    apt names, finding packages, rosdep keys and building from source instead.

    Open lesson
  46. 42

    Understanding the ROS 2 filesystem layout

    /opt/ros/lyrical, share, lib and include, workspace install folders and ~/.ros.

    Open lesson
  47. Phase 5 — ROS 2 Development on Ubuntu (Core Skills)
  48. 43

    Creating ROS 2 packages

    ros2 pkg create on Ubuntu, package.xml, dependencies with rosdep and building one package.

    Open lesson
  49. 44

    Writing ROS 2 nodes in C++17

    A node class, CMakeLists.txt for C++17, building, running and inspecting the node.

    Open lesson
  50. 45

    Publishers and subscribers

    Building a talker and listener pair and checking them with the ros2 tools.

    Open lesson
  51. 46

    Services and actions

    Calling services from the CLI, sending action goals, feedback and cancellation.

    Open lesson
  52. 47

    Parameters

    ros2 param list/get/set/dump, YAML files and loading them at start-up.

    Open lesson
  53. 48

    Launch files

    Writing, installing and running launch files from an Ubuntu workspace.

    Open lesson
  54. 49

    QoS profiles

    Inspecting QoS on Ubuntu, matching profiles and the common mismatch warnings.

    Open lesson
  55. 50

    Multi-threaded executors

    Choosing single or multi-threaded execution and checking CPU use in Ubuntu.

    Open lesson
  56. 51

    Lifecycle nodes

    Managing node states with ros2 lifecycle and start-up order on a robot.

    Open lesson
  57. 52

    Debugging ROS 2 nodes with gdb

    Debug builds, running a node under gdb, backtraces and core files.

    Open lesson
  58. 53

    ros2 doctor

    Checking the installation, network, QoS and package versions.

    Open lesson
  59. Phase 6 — Robot Modeling & Simulation (Ubuntu Robotics)
  60. 54

    URDF

    Writing a robot description and checking it with the Ubuntu tools.

    Open lesson
  61. 55

    Xacro

    Converting xacro to URDF on the command line and using it in launch files.

    Open lesson
  62. 56

    TF2 transforms

    Inspecting the transform tree with the Ubuntu tools and publishing static frames.

    Open lesson
  63. 57

    robot_state_publisher

    Running it from a launch file with a xacro-generated description.

    Open lesson
  64. 58

    joint_state_publisher

    Using the GUI sliders to test joints before any simulation or hardware.

    Open lesson
  65. 59

    Gazebo Harmonic installation

    Installing Gazebo and the ros_gz bridge on Ubuntu and running the first world.

    Open lesson
  66. 60

    Spawning robots in Gazebo

    ros_gz_sim create, spawning from robot_description and checking the model.

    Open lesson
  67. 61

    Gazebo plugins

    System plugins, the sensors system, and connecting Gazebo to ros2_control.

    Open lesson
  68. 62

    Simulated sensors

    Lidar, camera and IMU sensors in Gazebo, bridging them and viewing the data.

    Open lesson
  69. 63

    Simulated differential drive

    Driving the simulated robot with cmd_vel and checking odometry.

    Open lesson
  70. Phase 7 — Perception & Sensors (Ubuntu Robotics)
  71. 64

    LiDAR drivers

    Installing a lidar driver, serial permissions, the /scan topic and RViz2.

    Open lesson
  72. 65

    Camera drivers

    USB cameras with v4l2, RealSense, camera_info and calibration.

    Open lesson
  73. 66

    IMU drivers

    Serial and I2C IMUs, the sensor_msgs/Imu message and checking orientation and units.

    Open lesson
  74. 67

    Point cloud processing (PCL)

    Installing PCL, the pcl_ros tools, filtering clouds and viewing them in RViz2.

    Open lesson
  75. 68

    OpenCV on Ubuntu

    Installing OpenCV, cv_bridge, building C++ and Python examples.

    Open lesson
  76. 69

    Image transport

    Compressed images, republishing and measuring bandwidth on the network.

    Open lesson
  77. 70

    Depth processing

    Depth images, encodings, depth_image_proc and turning depth into point clouds.

    Open lesson
  78. 71

    Object detection

    Running a neural-network detector on Ubuntu, GPU use and detection messages.

    Open lesson
  79. 72

    ArUco markers

    Generating, printing and detecting ArUco markers for docking and alignment.

    Open lesson
  80. 73

    Sensor fusion with an EKF

    robot_localization: fusing wheel odometry and an IMU into one estimate.

    Open lesson
  81. Phase 8 — Navigation (Nav2) on Ubuntu
  82. 74

    Install Nav2

    apt packages, the TurtleBot 3 demo and checking that the prerequisites work.

    Open lesson
  83. 75

    SLAM Toolbox

    Live mapping, driving to map, saving the map and the pose graph.

    Open lesson
  84. 76

    AMCL localization

    Localizing on a saved map, setting the initial pose and checking convergence.

    Open lesson
  85. 77

    Map server

    Map files, loading them with nav2_map_server and checking the origin and resolution.

    Open lesson
  86. 78

    Costmaps

    Global and local costmaps, layers, inflation and inspecting them in RViz2.

    Open lesson
  87. 79

    Global planner

    NavFn and Smac planners, testing a plan with the compute_path action.

    Open lesson
  88. 80

    Local planner

    The controller server, DWB and Regulated Pure Pursuit, and tuning speeds.

    Open lesson
  89. 81

    Behavior Trees

    Where the BT XML lives, choosing a tree and viewing its state.

    Open lesson
  90. 82

    Recovery behaviors

    Spin, back up, wait, clear costmaps and testing each recovery from the terminal.

    Open lesson
  91. 83

    Docking

    Sending a dock goal, the docking server and verifying charging.

    Open lesson
  92. Phase 9 — Advanced Robotics on Ubuntu
  93. 84

    Real-time Linux

    PREEMPT_RT, priorities, CPU isolation, memory locking and measuring latency.

    Open lesson
  94. 85

    DDS tuning

    Cyclone and Fast DDS configuration files, network buffers and large messages.

    Open lesson
  95. 86

    Fleet management

    Running several robots, task assignment and open-source fleet software.

    Open lesson
  96. 87

    Multi-robot coordination

    Namespaces, shared resources, priorities and deadlock avoidance.

    Open lesson
  97. 88

    Distributed systems

    Several computers in one ROS 2 system: time sync, discovery server and networking.

    Open lesson
  98. 89

    Logging and metrics

    journald, log rotation, ROS log levels and collecting metrics from a running robot.

    Open lesson
  99. 90

    Safety systems

    Watchdogs, emergency stops, service restarts and the limits of software safety.

    Open lesson
  100. 91

    Hardware deployment

    Preparing a robot computer: images, services, updates, backups and rollback.

    Open lesson
  101. 92

    Jetson

    JetPack, power modes, tegrastats, CUDA containers and remote flashing.

    Open lesson
  102. 93

    Intel NUC

    Sizing an x86 robot computer, BIOS settings, power, cooling and ROS 2 installation.

    Open lesson
  103. 94

    Raspberry Pi

    Ubuntu on a Raspberry Pi 4/5, SD card vs SSD, GPIO, I2C, power and ROS 2 limits.

    Open lesson
  104. 95

    Building full AMR robots

    Project: a differential-drive AMR from packages to a deployed, self-starting robot.

    Open lesson
  105. 96

    Building full manipulator robots

    Project: an arm with ros2_control, MoveIt 2 and a safe deployment on Ubuntu.

    Open lesson

Practice

Project examples

Safe workstation setup

Install and document a repeatable Ubuntu development environment.

System health report

Build a shell-based report for disk, memory, processes and networking.

Robotics workspace

Prepare and validate the directories, tools and environment used in later courses.

Documentation

Checked against primary sources

Verified September 2026. Links open the official documentation.