ROSbot 2R - quick start
ROSbot 2R is an autonomous, open source robot platform for research and quick 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 one, you can get it here.
Unboxing
What's in the box:
- carrying case
- ROSbot 2R (with optional 3D camera and LiDAR already assembled)
- Wi-Fi 2.4GHz / 5GHz antenna
- 3x 18650 Li-Ion rechargeable batteries
- universal charger with power adapter
- charging cable
- microSD card with the software for ROSbot
- USB to Ethernet adapter
Additionally, to launch a robot for the first time you will need:
- a screwdriver
- USB-HDMI cable, mouse and keyboard OR Ethernet cable
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 batteries:
- turn ROSbot upside down
- unscrew battery cover mounted with two screws
- remove the battery cover
- place batteries accordingly to the symbols, keeping the black strip under the batteries
- place battery cover and mount it with screws
To charge the batteries, follow this guide.
To attach the antenna, screw it to the SMA antenna connector on the ROSbot rear panel.
Installing ROSbot's system image
ROSbot 2R is shipped with pre-installed ROS Humble 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 accidential 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 reinstalation 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:
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 in the rear panel of ROSbot.
- Turn on the robot and wait until it boots.
- Open Application Launcher (Husarion Logo in top-left corner) > System Tools > Terminator app.
ROSbot's graphical desktop environment requires about 3 minutes to start during first boot. The following ones 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 in the rear panel.
Plug in one end of the Ethernet cable into your computer and another one to the adapter.
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
- IPv4:
To connect with 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 your Wi-Fi network
Find available Wi-Fi networks with this Linux command:
nmcli dev wifi
ROSbot 2R is using netplan instead of graphical Wi-Fi manager. It allows you to have all physical network interfaces configured from a single text file.
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:
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
# ========================================
# wlan0:
# dhcp4: no
# dhcp6: no
# addresses:
# - 192.168.100.1/24
# access-points:
# "rosbotap":
# band: 5GHz
# mode: "ap"
# password: "husarion"
then save the file (with ctrl+o if using nano), apply the new network setup:
sudo netplan apply
You can check to which Wi-Fi network your ROSbot is connected by using this command:
sudo iwgetid
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.
Type
sudo ifconfig
to find your IP address (for wlan0
network interface). Save it for later.
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 thanks to Husarnet. The full guide how to do it is here
ROSbot ROS packages
At this stage you should have your ROSbot up and running, with remote (LAN or VPN) connection from your laptop.
You can run ROSbot's ROS packages natively on your ROSbot's host OS, by just cloning and building rosbot_ros repo. You will fina a ROS 2 API for the ROSbot 2R here.
Instead of installing ROSbot XL ROS package natively it is more convenient to use Docker images for that.
Pulling basic docker images for ROSbot
- ROS 2 Humble OS image
- ROS Noetic OS image
Access your ROSbot's terminal and run:
docker compose pull
To flash the right firmware, open ROSbot's terminal and execute one of the following command:
docker stop rosbot microros || true && docker run \
--rm -it --privileged \
husarion/rosbot:humble \
/flash-firmware.py /root/firmware.bin
Access your ROSbot's terminal and run:
To proceed with ROS Noetic OS image set the DISPLAY environment variable properly:
export DISPLAY=:0
docker compose pull
To flash the right firmware, open ROSbot's terminal and execute one of the following command:
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.binfor 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
Running the ROSbot Docker image (host mode)
- ROS 2 Humble 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
At this point, ROS nodes from the containers are available on the level of the host operating system.
To ensure that ROS topics are visible, stop the currently running ROS daemon:
ros2 daemon stop
Check available ROS topics:
ros2 topic list
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.
Open a new terminal and 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 Humble 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 different configuration, so remember to stop the basic setup at first:
docker compose down
Find available projects below:
link | description |
---|---|
rosbot-gamepad | Control the robot manually using a Logitech F710 gamepad |
rosbot-mapping | Create a map (using slam_toolbox) of the unknow environment with ROSbot controlled in LAN or over the Internet |
rosbot-navigation | Autonomous navigation (using navigation2) on a map created with the rosbot-mapping demo linked above. |
Here is a map example generated with rosbot-mapping project which can be used in rosbot-navigation project.