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, aDocumentation 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.
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.
sudoaccess — both scripts install system-level packages and require administrator privileges.
Installation Steps
Downloadros2_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.
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.
Navigate to the Downloads folder
Change into the directory where you saved the installation scripts:
Verify the executable bit is set
Confirm the permission change before running the script:Look for the
x flag on ros2_install.sh in the output (e.g., -rwxr-xr-x).Run the ROS2 installer
Execute the script. It will configure the locale, register the ROS2 apt repository, install It also adds two convenience aliases —
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 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.nb (open ~/.bashrc in nano) and sb (source ~/.bashrc).During locale setup the script also sets the following environment variables for the current session: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.Return home and source bashrc
After the installer finishes, navigate back to the home directory and reload your shell environment:
Open a new terminal and install additional ROS2 packages
Press Ctrl + Alt + T to open a new terminal so the updated Install the extended set of joint, URDF, TF2, Gazebo, and RViz packages:The
~/.bashrc environment is fully active. Then run the following commands in sequence:$ROS_DISTRO variable is resolved from your environment and will expand to humble.Navigate to Downloads and make install_ros_packages.sh executable
Change back into the Grant execute permission:Verify the permission:
Downloads folder where the second script is located:Run install_ros_packages.sh
Execute the second installer. It installs ros2_control, Gazebo-ros2-control, turtlesim, robot-localization, joy, plotjuggler, and more:
Source bashrc again
Reload the shell environment to pick up any new entries written by the second script:
Install transforms3d
Install the
transforms3d Python library, used by the ros-humble-tf-transformations package for 3-D rotation math:Install Terminator terminal
Install Terminator, a tiling terminal emulator that makes it easy to run multiple ROS2 nodes side-by-side:
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_controlplugin - 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
~/colcon_ws/src, build them with colcon build --symlink-install, and launch your first mobile robot simulation.