Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xXThanatosXx/MobileRobot/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through installing a complete ROS2 Humble mobile-robotics development environment on Ubuntu 22.04 using MobileRobot’s two automated shell scripts. By the end you will have ROS2 Humble, Gazebo, ros2_control, plotjuggler, and all supporting packages installed, a colcon_ws workspace ready to build, and every needed source line already written into your ~/.bashrc.

Prerequisites

Before running the scripts, make sure you have the following in place:
  • Ubuntu 22.04 LTS — running on bare metal or inside a VMware Workstation Player 17 virtual machine. Download the Ubuntu 22.04 desktop ISO from the official release page: ubuntu-22.04.5-desktop-amd64.iso.
  • Internet connection — the scripts fetch packages from the ROS2 apt repository and the Ubuntu package mirrors.
  • sudo access — both scripts install system-level packages and require administrator privileges.
If you have another ROS distribution already installed, open ~/.bashrc and comment out any existing source /opt/ros/<OTHER_DISTRO>/setup.bash line before running ros2_install.sh. Running two ROS distributions simultaneously will cause environment conflicts.
On Windows or macOS? Skip this guide and head to the Docker installation path instead. The pre-built xxthanatosxx/ros2-humble:1.0.0 image gives you a fully configured ROS2 Humble environment inside a container without needing a virtual machine.

Installation Steps

Download ros2_install.sh and install_ros_packages.sh from the Scripts/ folder of the MobileRobot repository and save both files to your ~/Downloads directory before starting.
1

Open a terminal

Press Ctrl + Alt + T to open a new terminal window. All commands in this guide are entered here unless a new terminal is explicitly requested.
2

Navigate to the Downloads folder

Change into the directory where you saved the installation scripts:
cd Downloads
3

Make ros2_install.sh executable

Grant execute permission to the primary installer script:
sudo chmod +x ros2_install.sh
4

Verify the executable bit is set

Confirm the permission change before running the script:
ls -la
Look for the x flag on ros2_install.sh in the output (e.g., -rwxr-xr-x).
5

Run the ROS2 installer

Execute the script. It will configure the locale, register the ROS2 apt repository, install ros-humble-desktop, create a colcon_ws workspace, and update ~/.bashrc automatically. The script pauses for confirmation before the installation begins — press Enter to proceed.
./ros2_install.sh
ros2_install.sh automatically appends the following lines to your ~/.bashrc and sets ROS_DOMAIN_ID=0. You can adjust the domain ID later by editing ~/.bashrc directly.
source /opt/ros/humble/setup.bash
source ~/colcon_ws/install/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
export ROS_DOMAIN_ID=0
It also adds two convenience aliases — nb (open ~/.bashrc in nano) and sb (source ~/.bashrc).During locale setup the script also sets the following environment variables for the current session:
export LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8 is written to the system locale configuration via sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8. These ensure consistent UTF-8 encoding required by ROS2.
6

Return home and source bashrc

After the installer finishes, navigate back to the home directory and reload your shell environment:
cd
source .bashrc
7

Open a new terminal and install additional ROS2 packages

Press Ctrl + Alt + T to open a new terminal so the updated ~/.bashrc environment is fully active. Then run the following commands in sequence:
source .bashrc
cd ..
sudo apt-get update
Install the extended set of joint, URDF, TF2, Gazebo, and RViz packages:
sudo apt-get install ros-$ROS_DISTRO-joint-state-publisher ros-$ROS_DISTRO-xacro ros-$ROS_DISTRO-joint-state-publisher-gui ros-$ROS_DISTRO-tf2-* ros-$ROS_DISTRO-gazebo-* ros-$ROS_DISTRO-rviz-default-plugins
The $ROS_DISTRO variable is resolved from your environment and will expand to humble.
8

Navigate to Downloads and make install_ros_packages.sh executable

Change back into the Downloads folder where the second script is located:
cd Downloads
Grant execute permission:
sudo chmod +x install_ros_packages.sh
Verify the permission:
ls -la
9

Run install_ros_packages.sh

Execute the second installer. It installs ros2_control, Gazebo-ros2-control, turtlesim, robot-localization, joy, plotjuggler, and more:
./install_ros_packages.sh
10

Source bashrc again

Reload the shell environment to pick up any new entries written by the second script:
source .bashrc
11

Install pip

Install the Python 3 package manager, which is required for the next step:
sudo apt-get install python3-pip
12

Install transforms3d

Install the transforms3d Python library, used by the ros-humble-tf-transformations package for 3-D rotation math:
pip install transforms3d
13

Install Terminator terminal

Install Terminator, a tiling terminal emulator that makes it easy to run multiple ROS2 nodes side-by-side:
sudo apt-get install terminator
14

Verify the installation

Confirm that ROS2 Humble is correctly installed by checking the active distribution:
rosversion -d
The command should print:
humble
If you see humble, your environment is fully configured and ready for mobile-robotics development.

What Was Installed

After completing all steps, your Ubuntu 22.04 system has:
  • ROS2 Humble Desktop — core libraries, rviz2, rqt, and DDS middleware
  • colcon workspace at ~/colcon_ws — pre-built and sourced automatically on login
  • Gazebo with full ROS2 bridge and ros2_control plugin
  • Simulation & control packages — turtlesim, joint-state-publisher-gui, ros2-controllers, robot-localization, joy, joy-teleop, plotjuggler
  • Python tooling — pip, transforms3d
  • Developer tools — colcon, rosdep, vcstool, Terminator
You are now ready to clone course packages into ~/colcon_ws/src, build them with colcon build --symlink-install, and launch your first mobile robot simulation.

Build docs developers (and LLMs) love