Skip to content

[EN] Networking Setup

Thorgaran edited this page Jun 18, 2023 · 2 revisions

🌐 Turtlebot4 Networking Setup

This page has been written based on the Official Turtlebot4 Manual as well as personal experience.

Introduction

Turtlebot4 can work in 2 different network configuration for ROS2 :

  • Simple Server

  • Discovery Server

Thoses configurations changes the way the Raspberry Pi and the Create3 interact with the network.

Simple Server :

Discovery Server :

As Discovery server needs extra configuration on our development machines, we only used Simple Server.

Moreover, Turtlebot4 comes with two networking modes :

  • Access Point

  • Client

This concept is really important to understand as it's your main way to communicate with the robots.

We experienced huge connectivity issues when trying to interact from host machine to robots nodes, and we ended up working directly inside their Raspberry Pi.

The following documentation explains how to access and configure Turtlebots4 depending on their networking mode, and how to recover them if both modes don't work anymore.

⚠️ Please read the whole documentation's sections you need before committing changes on the robot, or you may lose it and you will need to perform Recover mode additional steps. ⚠️

Access Point mode

The robot in Access Point mode acts as a wifi emitter from which you can connect your computer.

The default SSID is:

SSID: Turtlebot4 Password: Turtlebot4

⚠️ However, there will be no internet access. ⚠️ Which means :

  • No packages install or upgrade

  • No remote git access

  • No internet at all on your machine, then no documentation access available

The only advantage of this mode might be a better network speed / response, but it has not been really proven.

To access the Raspberry Pi, you can use ssh with the official provided default ip and user :

User: ubuntu

Access Point Ip: 10.42.0.1

Password: turtlebot4

Command example :

ssh ubuntu@10.42.0.1 

Note: You might need admin rights to perform ssh. In this case use sudo command

Client mode

The robot in Client mode needs to connect to an existing network. From our experience, here are the pros and cons:

Pros ✅ Cons ❌
Internet Access Public and Enterprise networks not working
Need to setup a namespace if multiple robots are connected

As the robots can't connect to UTBM's internal network, we setup a bridge using a laptop and a router. See the corresponding page in the wiki for more details.

To ssh into the robots on the H11 TP-Link network, get their IP on the related page and perform the command :

ssh ubuntu@192.168.0.X

User: ubuntu

Ip: 192.168.0.X

Password: turtlebot4

Switching network mode

Access the robot's Raspberry Pi using ssh (read Access Point or Client sections to see how).

Enter the following command :

turtlebot4-setup

Navigate to Wifi Setup, then fill the corresponding fields. Usually, for both Access Point and Client mode, we leave the IP and the DHCP settings as default.

⚠️ Be careful when entering the SSID and the password. Incorrect settings will make you lose connection to the robot and you will have to perform Recovery. ⚠️

See an example here :

Don't forget to press Save on the Wifi menu, then Apply Settings. The robot may take some time to switch its network configuration.

Recovery mode

If you can't access the robot's Raspberry Pi both using Client and Access Point mode, you will have to plug an ethernet cable to recover.

  • Open your wired settings

  • Set a manual IP for your device

    • Address : 192.168.185.5

    • Netmask : 255.255.255.0

    • Gateway : 192.168.185.1

You should now be able to ssh into robot using its static IP :

ssh ubuntu@192.168.185.3

User: ubuntu

Ip: 192.168.185.3

Password: turtlebot4

Go to Wifi Setup and ensure the SSID and Password are correct, to make the robot back on a regular network.

Don't forget to press Save on the Wifi menu, then Apply Settings. The robot may take some time to switch its network configuration.