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.
If you don't have ROSbot 2R or ROSbot 2 PRO yet, you can get it from the online store.
This is a quick start guide. If you need a manual instead, you can find it here.
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.
- Utility script
- Docker way
I have the *-2023-07-18
(or higher) version of the Husarion OS.
I have older version of the Husarion OS than *-2023-07-18
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
- ROSbot 2R
- ROSbot 2 PRO
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
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.
- Plug in a display with HDMI, mouse and keyboard into the USB port on the rear panel of the ROSbot.
- Turn on the robot and wait until it boots.
- Open the Application Launcher (Husarion Logo in the top-left corner) > System Tools > Terminator app.
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.
- Turn on the robot and wait until it boots.
- Plug in the Ethernet adapter (included in a set) to a USB port on the rear panel of the ROSbot.
- 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.
- ROSbot 2R
- ROSbot 2 PRO
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
Follow the old How To Start for ROSbot 2 PRO.]
-
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 alsohusarion
.
Connecting ROSbot to the Wi-Fi network
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:
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
:
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
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:
sudo netplan -d apply
You can check to which Wi-Fi network your ROSbot is connected by using this command:
sudo iwgetid
To find your IP address (for the wlan0
network interface) type:
ip -4 addr show wlan0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'
Save this IP address for the next step.
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:
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).
You will find a ROS 2 API for the ROSbot here.
Flashing the firmware
Access your ROSbot's terminal and run:
- Utility script
- Docker way
~/flash_firmware.sh
- ROS 2 OS image
- ROS Noetic OS image
docker compose pull
To flash the right firmware, open ROSbot's terminal and execute the following command:
docker stop rosbot microros || true && docker run \
--rm -it --privileged \
husarion/rosbot:humble-0.6.1-20230712 \
flash-firmware.py /root/firmware.bin
docker compose pull
To flash the right firmware, open ROSbot's terminal and execute one of the following commands:
-
for differential drive (regular wheels):
husarion@rosbot2r:/home/husarion$docker stop rosbot ros-master || true && \
docker run --rm -it --privileged \
husarion/rosbot:noetic \
/flash-firmware.py /root/firmware_diff.bin -
for omnidirectional wheeled ROSbot (mecanum wheels):
husarion@rosbot2r:/home/husarion$docker stop rosbot ros-master || true && \
docker run --rm -it --privileged \
husarion/rosbot:noetic \
/flash-firmware.py /root/firmware_mecanum.bin
Starting the Driver
To launch basic ROSbot 2R ROS 2 nodes, paste the following command in the ROSbot's terminal:
- Utility script
- Docker way
~/ros_driver_start.sh
- ROS 2 OS image
- ROS Noetic OS image
To launch basic ROSbot nodes, paste the following command in the ROSbot's terminal (depending on the OS images you use):
docker compose up -d rosbot microros
To launch basic ROSbot nodes, paste the following command in the ROSbot's terminal (depending on the OS images you use):
docker compose up -d rosbot ros-master
At this point, ROS nodes from the containers are available on the level of the host operating system.
- ROS 2 OS image
- ROS Noetic OS image
Check available ROS topics:
ros2 topic list
If you don't have ROS 2 Humble installed natively on your OS, access the rosbot
container:
docker exec -it rosbot bash
Now you can run the following command to check the topics:
ros2 topic list
Check available ROS topics:
rostopic list
Manual ROSbot driving with teleop_twist_keyboard
Now launch a teleop_twist_keyboard
ROS node for manual ROSbot control:
- ROS 2 OS image
- ROS Noetic OS image
ros2 run teleop_twist_keyboard teleop_twist_keyboard
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
After running the command, you will see the usage instruction:
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.
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:
- Utility script
- Docker way
~/ros_driver_stop.sh
docker compose down
Find available projects below:
link | description |
---|---|
rosbot-gamepad | Control the robot manually using a Logitech F710 gamepad |
rosbot-telepresence | Stream a live video from Orbbec Astra to a window on your PC. Control the robot using teleop-twist-keyboard |
rosbot-autonomy | A 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.
ROS / ROS 2 Tutorials
- ROS 2
- ROS
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.
ROS (Robot Operating System) offers libraries and tools to help software developers create robotic applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. It's very powerful and functional tool dedicated to design robots. We created the set of ROS Tutorials dedicated for this platform to make it easier to familiarize yourself with these frameworks.