Turtlebot 2 - Installation guide with Ubuntu 20.04

Last update: 28/08/2025

Note: The installation was tested, but not with a real robot connected.

This is a short installation guide for Turtlebot2 on Ubuntu 20.04 using ROS Noetic.

The main approach is to download previously supported versions of the source libraries (e.g. Turtlebot2 Melodic libraries). Using these, you can create a catkin workspace that just needs to be referenced to access all the important nodes from Turtlebot2.


Install ROS Noetic

Install ROS Noetic first, following the official instructions.

Install required tools

sudo apt update
sudo apt install git cmake ssh openssh-server curl

Install ROS as usual

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python3-rosdep
sudo rosdep init
rosdep update

Install Kobuki

Kobuki refers to the mobile robot base for the Turtlebot2. Kobuki is the physical, wheeled platform of the robot. It’s the part that handles the locomotion, including motors, wheels, and basic sensors like bump sensors, cliff sensors, and odometry.

Create a workspace

mkdir -p ~/kobuki_ws/src/
cd ~/kobuki_ws/src/

Install dependencies

sudo apt update
sudo apt install ros-noetic-sophus libusb-1.0-0-dev libftdi-dev

Download the script

Important: Edit the following line in the script. Change it from:

git clone --branch release/0.7-melodic https://github.com/yujinrobot/kobuki_msgs.git

to:

git clone --branch melodic https://github.com/yujinrobot/kobuki_msgs.git

Download all the libraries

  • Run the script to download all the libraries:
sh ./kobuki.sh
  • Edit the file ~/kobuki_ws/src/kobuki_core/kobuki_ftdi/CMakeLists.txt at line 18: Change
    pkg_search_module(libusb REQUIRED libusb)
    

    to

    pkg_search_module(libusb REQUIRED libusb-1.0)
    

Build the kobuki_ws workspace

cd ~/kobuki_ws
catkin_make

# Source the setup script
source ~/kobuki_ws/devel/setup.bash

Tip: To avoid sourcing manually each time, add this line to your ~/.bashrc:

source ~/kobuki_ws/devel/setup.bash

Install Turtlebot2

The TurtleBot2 typically includes the Kobuki base, a laptop or single-board computer, and a 3D sensor (e.g. Kinect), with a mounting structure.

Create a workspace

mkdir -p ~/turtlebot2_ws/src/
cd ~/turtlebot2_ws/src/

Source the Kobuki workspace

source ~/kobuki_ws/devel/setup.bash

Download the script

Download the following script into your current folder: https://github.com/Aoi-hosizora/turtlebot2-on-noetic/blob/master/turtlebot2.sh

Build the workspace

sh ./turtlebot2.sh

cd ~/turtlebot2_ws
catkin_make

source ~/turtlebot2_ws/devel/setup.bash

Tip: You can also add this line to your ~/.bashrc for convenience:

source ~/turtlebot2_ws/devel/setup.bash

Everything should now be ready and the Turtlebot2 nodes should be operational!

Using Turtlebot2

To test, run one of the following commands (make sure the Turtlebot2 is powered on and connected via USB):

Bring Up the robot

roslaunch turtlebot_bringup minimal.launch

Control with keyboard

roslaunch turtlebot_teleop keyboard_teleop.launch

Visualize in RViz

roslaunch turtlebot_rviz_launchers view_robot.launch

Troubleshooting:

  • If you encounter errors, check that all workspaces are sourced in your terminal (echo $ROS_PACKAGE_PATH should include both workspaces).
  • Ensure all dependencies are installed and that your user has access to the USB device (lsusb).

Source

https://github.com/Aoi-hosizora/turtlebot2-on-noetic