ROSbot XL - Network configuration
How the network is set up
This page describes ROSbot running Husarion OS (Ubuntu 24.04, ROS 2 Jazzy). All network interfaces are managed by NetworkManager, so the standard nmcli / nmtui tools and the desktop network menu all work.
| Interface | What it does |
|---|---|
| Ethernet | Cable to a router: the robot gets an address automatically. Cable straight to a laptop: the robot is at 192.168.77.2. |
| Wi-Fi | Regular NetworkManager connections. The first one is created by the first-boot wizard; you can add, change or remove them at any time (see below). |
| Hostname | The robot is reachable as rosbot-<SERIAL_NUMBER>.local. |
192.168.77.2Don't change or remove this address: the robot needs it (on ROSbot XL its computer talks to the motor controller over it).
Check the current connection
nmcli device status
Shows every interface, its state and the connection it uses. To list the saved connections and see the robot's addresses:
nmcli connection show
hostname -I
Change the Wi-Fi network from the terminal
Connect over SSH (Ethernet or the current Wi-Fi) or open a terminal on the robot's desktop.
- nmcli
- nmtui
- Setup wizard
-
Scan for networks:
husarion@rosbot:~$sudo nmcli device wifi rescannmcli device wifi list -
Connect (the connection is saved and used again after a reboot):
husarion@rosbot:~$sudo nmcli device wifi connect "<SSID>" password "<PASSWORD>"For a hidden network add
hidden yes. If the robot has more than one Wi-Fi card, pick one withifname <INTERFACE>(names fromnmcli device status). -
Make the robot always retry this network, even when the router is slow to respond:
husarion@rosbot:~$sudo nmcli connection modify "<SSID>" connection.autoconnect-retries 0The connection is named after the network; check the exact name with
nmcli connection show.
If you are connected to the robot over the Wi-Fi you are replacing, your SSH session drops when the robot switches networks. Reconnect using the new IP address or rosbot-<SERIAL_NUMBER>.local from a computer on the new network.
A text menu, convenient over SSH and the only terminal option needed for WPA Enterprise networks (e.g. eduroam):
sudo nmtui
Choose Activate a connection, pick the network, enter the password and go back with Esc. Then apply the retry setting from step 3 of the nmcli tab.
The first-boot wizard can be run again:
sudo husarion-config
It asks every first-boot question again (robot model, sensors, Wi-Fi, ROS discovery range, serial number) and re-applies the answers. Use it when you want to change more than the Wi-Fi; for the Wi-Fi alone, nmcli or nmtui is quicker.
Connecting from the desktop
Connecting from the network menu of the robot's desktop works too. When you connect, make the network available to all users and store the password for all users; otherwise the robot joins the network only after somebody logs in on the desktop. Then apply the retry setting from step 3 above.
Fixed IP address on your network
The easiest way is a DHCP reservation for the robot in your router.
Setting a fixed address on the robot instead
Change the Wi-Fi connection (not the Ethernet one), adjusting the addresses to your network:
sudo nmcli connection modify "<SSID>" ipv4.method manual \
ipv4.addresses 192.168.1.50/24 ipv4.gateway 192.168.1.1 ipv4.dns 192.168.1.1
sudo nmcli connection up "<SSID>"
Ethernet
-
To a router or switch: just plug the cable in; the robot gets an address automatically. Moving the cable to another network needs no configuration either.
-
Directly to a laptop: set your laptop's Ethernet card to a static address in the same subnet, e.g.
192.168.77.27with mask255.255.255.0(anything except.2), then:user@laptop:~$ssh husarion@192.168.77.2Alternatively share your laptop's internet over the cable ("Shared to other computers" in Linux NetworkManager, Internet Connection Sharing on Windows); the robot then gets an address and internet access from the laptop.
What not to do
- Don't run
sudo netplan apply. It can cut the robot off the network until a reboot. Changing the Wi-Fi doesn't need it. - Don't change the settings of the wired (Ethernet) connection. Husarion OS manages it and overwrites such changes.
- Don't remove
192.168.77.2, even if another device on your network uses the same address; the robot warns you about such a conflict when you log in.
Remote access
- Same network:
ssh husarion@rosbot-<SERIAL_NUMBER>.localorssh husarion@<ROBOT_IP>(default passwordhusarion). Husarion Cockpit is available athttp://rosbot-<SERIAL_NUMBER>.local. - Over the internet: use Husarnet VPN.