Skip to main content

ROSbot 3 - 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.

InterfaceWhat it does
EthernetCable to a router: the robot gets an address automatically. Cable straight to a laptop: the robot is at 192.168.77.2.
Wi-FiRegular NetworkManager connections. The first one is created by the first-boot wizard; you can add, change or remove them at any time (see below).
HostnameThe robot is reachable as rosbot-<SERIAL_NUMBER>.local.
Keep 192.168.77.2

Don'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​

husarion@rosbot:~$
nmcli device status

Shows every interface, its state and the connection it uses. To list the saved connections and see the robot's addresses:

husarion@rosbot:~$
nmcli connection show
husarion@rosbot:~$
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.

  1. Scan for networks:

    husarion@rosbot:~$
    sudo nmcli device wifi rescan
    nmcli device wifi list
  2. 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 with ifname <INTERFACE> (names from nmcli device status).

  3. 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 0

    The connection is named after the network; check the exact name with nmcli connection show.

SSH over Wi-Fi

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.

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:

husarion@rosbot:~$
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.27 with mask 255.255.255.0 (anything except .2), then:

    user@laptop:~$
    ssh husarion@192.168.77.2

    Alternatively 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>.local or ssh husarion@<ROBOT_IP> (default password husarion). Husarion Cockpit is available at http://rosbot-<SERIAL_NUMBER>.local.
  • Over the internet: use Husarnet VPN.

Older ROSbot versions (2R / 2 PRO / 2)​

On ROSbot 2R, 2 PRO and 2 running their original system images (not Husarion OS), see the legacy network instructions.