Skip to main content

ROSbot 2R / 2 PRO - quick start

ROSbot 2R / 2 PRO is an autonomous, open source robot platform designed for research and rapid prototyping use cases. It can be used as a learning platform for Robot Operating System (ROS) as well as a base for a variety of robotic applications like inspection robots, custom service robots etc.


How to get it?

If you don't have ROSbot 2R or ROSbot 2 PRO yet, you can get it from the online store.

Looking for a manual?
OS version

To use the utility scripts (eg. ~/flash_firmware.sh, ~/ros_driver_start.sh) make sure you have at least the *-2023-07-18 version of the ROS 2 Husarion OS installed.

If you have the older version, please update it or just use commands from the [Docker way] tab.

I have the *-2023-07-18 (or higher) version of the Husarion OS.

Unboxing

What's in the box:

  • carrying case
  • ROSbot (with optional 3D camera and LiDAR already assembled)
  • Wi-Fi 2.4GHz / 5GHz antenna
  • 3x 18650 Li-Ion rechargeable batteries
  • a universal charger with power adapter
  • charging cable
  • microSD card with the software (for ROSbot 2R)
  • USB to Ethernet adapter

Additionally, to launch the robot for the first time, you will need:

  • a screwdriver
  • USB-HDMI cable, mouse and keyboard OR Ethernet cable
Scheme 2RScheme 2R

Inserting Li-ION batteries and mounting Wi-Fi antenna

Your ROSbot is assembled, but to get it ready to work, you need to provide a power supply and attach the antenna.

To mount the batteries:

  • turn ROSbot upside down
  • unscrew the battery cover mounted with two screws
  • remove the battery cover
  • place the batteries accordingly to the symbols, keeping the black strip under the batteries
  • place the battery cover back in position and mount it with screws.

To charge the batteries, follow this guide.

To attach the antenna, simply screw it to the SMA antenna connector on the rear panel of ROSbot.

Installing ROSbot's system image

info

ROSbot 2R is shipped with pre-installed OS image. If you have just received your brand new ROSbot you may skip this step.

In some cases you will need to restore ROSbot system to its default settings:

  • in case of accidental damage of the system,
  • to update the OS to the newest version with the supported documentation,
  • to clear all user changes and restore factory settings.

Please find the OS reinstallation guide here.

Accessing ROSbot's Linux terminal

To perform the initial network configuration, you need to access ROSbot's Linux terminal first. There are two options of doing that:

Option 1: Using display, mouse and keyboard

ROSbot is basically a computer running Ubuntu, so let's open it like a standard PC.

  1. Plug in a display with HDMI, mouse and keyboard into the USB port on the rear panel of the ROSbot.
  2. Turn on the robot and wait until it boots.
  3. Open the Application Launcher (Husarion Logo in the top-left corner) > System Tools > Terminator app.

Operaing system GUI

info

ROSbot's graphical desktop environment requires about 3 minutes to start during first boot. Subsequent boots require only about 1 minute after power on.

Option 2: Using an Ethernet adapter

In the ROSbot 2R set, there is one USB-Ethernet card.

  1. Turn on the robot and wait until it boots.
  2. Plug in the Ethernet adapter (included in a set) to a USB port on the rear panel of the ROSbot.
  3. Plug one end of the Ethernet cable into your computer and another one to the adapter.
If you don't have at least the *-2023-07-18 version of the Husarion OS installed, first complete this step.

Set a static IP address on your computer for its Ethernet card in a 192.168.77.0/24 subnet, eg:

  • IPv4: 192.168.77.27
  • mask: 255.255.255.0
  1. To connect to the ROSbot via ssh, type in your terminal application:

    user@mylaptop:/home/user$
    ssh husarion@192.168.77.2

    The default password for user husarion is also husarion.

Connecting ROSbot to the Wi-Fi network

Netplan

ROSbot 2R / 2 PRO uses netplan instead of a graphical Wi-Fi manager. It allows you to have all physical network interfaces configured from a single text file.

To find available Wi-Fi networks, use the following Linux command:

husarion@rosbot2r:/home/husarion$
nmcli dev wifi

To connect your ROSbot to a Wi-Fi network, edit /etc/netplan/01-network-manager-all.yaml file, e.g. with nano:

husarion@rosbot2r:/home/husarion$
sudo nano /etc/netplan/01-network-manager-all.yaml

And modify lines 22-23 by replacing "PLACE_YOUR_WIFI_SSID_HERE" with your SSID (Wi-Fi network name) and "PLACE_YOUR_WIFI_PASSWORD_HERE" with your Wi-Fi password:

See the Netplan configuration file
/etc/netplan/01-network-manager-all.yaml
network:
version: 2
renderer: NetworkManager

ethernets:

all-eths:
match:
name: eth*
dhcp4: no
dhcp6: no
optional: true
addresses:
- 192.168.77.2/24

wifis:
# ========================================
# standard Wi-Fi config (client)
# ========================================
wlan0:
dhcp4: true
dhcp6: true
optional: true
access-points:
"PLACE_YOUR_WIFI_SSID_HERE":
password: "PLACE_YOUR_WIFI_PASSWORD_HERE"

# ========================================
# access point Wi-Fi config
# replace "channel" with the number permitted in your country
# https://en.wikipedia.org/wiki/List_of_WLAN_channels
# ========================================
# wlan0:
# dhcp4: yes
# addresses:
# - 192.168.78.1/24
# access-points:
# "rosbotap":
# band: "5GHz"
# channel: "149"
# mode: "ap"
# password: "husarion"

then save the file (with ctrl+o if using nano) and apply the new network setup:

husarion@rosbot2r:/home/husarion$
sudo netplan -d apply

You can check to which Wi-Fi network your ROSbot is connected by using this command:

husarion@rosbot2r:/home/husarion$
sudo iwgetid

To find your IP address (for the wlan0 network interface) type:

husarion@rosbot2r:/home/husarion$
ip -4 addr show wlan0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'

Save this IP address for the next step.

Complex Wi-Fi setups

If your Wi-Fi network setup is more complex (eg. if you want to connect to Eduroam based Wi-Fi that is popular in many universities), visit netplan configuration examples and netplan documentation.

Remote access

OPTION 1: in a local network

While ROSbot is connected to a Wi-Fi network, you can access it by using its IPv4 address by SSH:

user@mylaptop:/home/user$
ssh husarion@ROSBOT_IP

OPTION 2: over the Internet (VPN)

If LAN access is not enough, you can access the ROSbot over the Internet using Husarnet. You can find the full guide on how to do it here.

Launching the ROS driver

At this stage, your ROSbot should be up and running, with a remote (LAN or VPN) connection from your laptop.

Now let's start the ROS Driver that brings up the rosbot_ros package and the Micro-ROS Agent (for interfacing with the firmware running on the STM32 Microcontroller).

ROS 2 API

Flashing the firmware

Access your ROSbot's terminal and run:

husarion@rosbot2r:/home/husarion$
~/flash_firmware.sh

Starting the Driver

To launch basic ROSbot 2R ROS 2 nodes, paste the following command in the ROSbot's terminal:

husarion@rosbot2r:/home/husarion$
~/ros_driver_start.sh

At this point, ROS nodes from the containers are available on the level of the host operating system.

Check available ROS topics:

husarion@rosbot2r:/home/husarion$
ros2 topic list

ROS2 topic list

info

If you don't have ROS 2 Humble installed natively on your OS, access the rosbot container:

husarion@rosbot2r:/home/husarion$
docker exec -it rosbot bash

Now you can run the following command to check the topics:

root@a837c86387c2:/ros2_ws#
ros2 topic list

Manual ROSbot driving with teleop_twist_keyboard

Now launch a teleop_twist_keyboard ROS node for manual ROSbot control:

husarion@rosbot2r:/home/husarion$
ros2 run teleop_twist_keyboard teleop_twist_keyboard

After running the command, you will see the usage instruction:

ROSbot with Navigation2 and Slam Toolbox

Reference projects

Now you know how to access ROSbot's ROS node from the Linux terminal.

Running ROS natively is fine for relatively small projects. For more complex ones, the full dockerized setup is a better approach.

warning

Next demos start ROSbot's containers in a different configuration. If you're planning to try them, make sure to stop the basic setup first by running the following command:

husarion@rosbot2r:/home/husarion$
~/ros_driver_stop.sh

Find available projects below:

linkdescription
rosbot-gamepadControl the robot manually using a Logitech F710 gamepad
rosbot-telepresenceStream a live video from Orbbec Astra to a window on your PC. Control the robot using teleop-twist-keyboard
rosbot-autonomyA combination of mapping and navigation projects allowing simultaneous mapping and navigation in unknown environments.

Here is an example map generated with the rosbot-autonomy project.

map example

ROS / ROS 2 Tutorials

ROS 2 (Robot Operating System 2) provides libraries and tools to help software developers create robotic applications. We've put together a series of ROS 2 Tutorials dedicated for this platform that serve as a practical introduction to ROS 2. You can run them on any of our ROSbots, either on a physical robot or in the simulation environment. These step-by-step guides are tailored to accommodate both beginners embarking on their ROS 2 journey and experienced users looking to deepen their understanding of robot navigation.