Skip to main content

ROSbot 2 PRO - quick start

ROSbot 2 PRO 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 2 (with optional 3D camera and LiDAR already assembled)
  • Wi-Fi 2.4GHz antenna
  • 3x 18650 Li-Ion rechargeable batteries
  • universal charger with power adapter
  • charging cable
  • USB to Ethernet adapter
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 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

info

ROSbot 2 PRO is shipped with pre-installed ROS Melodic OS image. If you have just received your brand new ROSbot and you want to install ROS Noetic you can go to the next 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.

Connecting ROSbot to your Wi-Fi network

At first ROSbot need to be connected to your Wi-Fi network.

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 USB port in the rear panel of ROSbot.
  2. Turn on the robot and wait until it boots.
  3. Connect to a Wi-Fi network using Ubuntu GUI.
  4. Open Linux terminal and type ifconfig to find your IP address. Save it for later.

Option 2: Using Ethernet adapter

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

  1. Turn on the robot and wait until it boots.
  2. Plug in Ethernet adapter (included in set) to USB port in the rear panel.
  3. Plug in one end of the Ethernet cable into your computer and another one to the adapter.
  4. To connect with ROSbot via ssh, type in your terminal application: ssh husarion@192.168.0.1 and password husarion.
  5. Connect to a Wi-Fi network.
  • In the terminal, type nmtui and press Enter. You should see:

  • Go to Active a connection and tap Enter

  • Chose your Wi-Fi network and tap Enter one more time. Enter your password, confirm it and tap Esc to get back to main menu.

  • Use Quit to close nmtui.
  1. Type ifconfig to find your IP address. Save it for later.

Remote access in LAN

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

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

Remote access 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, however the more convenient way is using Docker images for that.

Pulling basic docker images for ROSbot:

1. Create the /home/husarion/.env file

husarion@rosbot:/home/husarion$
nano /home/husarion/.env

with the following content:

SERIAL_PORT=/dev/ttyS4
LIDAR_SERIAL=/dev/ttyUSB0
RPLIDAR_BAUDRATE=256000

Press <ctrl + o> and then <ctrl + x> to save and quit.

2. Create a new file /home/husarion/compose.yaml

husarion@rosbot:/home/husarion$
nano /home/husarion/compose.yaml

and paste the following content inside:

/home/husarion/compose.yaml
services:
astra:
image: husarion/astra:humble
container_name: astra
devices:
- /dev/bus/usb/
volumes:
- ./astra-params.yaml:/ros2_ws/install/astra_camera/share/astra_camera/params/astra_mini_params.yaml
environment:
- RMW_IMPLEMENTATION
command: ros2 launch astra_camera astra_mini.launch.py

rplidar:
image: husarion/rplidar:humble
container_name: rplidar
restart: unless-stopped
devices:
- ${LIDAR_SERIAL:?err}:/dev/ttyUSB0
environment:
- RMW_IMPLEMENTATION
command: >
ros2 launch sllidar_ros2 sllidar_launch.py
serial_baudrate:=${RPLIDAR_BAUDRATE:-256000}

microros:
image: husarion/micro-ros-agent:humble
container_name: microros
restart: unless-stopped
devices:
- ${SERIAL_PORT:?err}
environment:
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
command: ros2 run micro_ros_agent micro_ros_agent serial -D $SERIAL_PORT serial -b 576000 # -v6

rosbot:
image: husarion/rosbot:humble
container_name: rosbot
restart: unless-stopped
environment:
- RMW_IMPLEMENTATION
command: ros2 launch rosbot_bringup bringup.launch.py

Press <ctrl + o> and then <ctrl + x> to save and quit.

3. Create a new file /home/husarion/astra-params.yaml

husarion@rosbot:/home/husarion$
nano /home/husarion/astra-params.yaml

and paste the following content inside:

/home/husarion/astra-params.yaml
camera_name : "camera"
color_width: 640
color_height: 480
color_fps: 30
enable_color: true

# IR camera width/height/FPS
ir_width: 640
ir_height: 480
ir_fps: 30
enable_ir: false

# depth camera width/height/FPS
depth_width: 640
depth_height: 480
depth_fps: 30
enable_depth: false

# open depth to color alignment (hardware alignment)
depth_align: false
serial_number: ""
number_of_devices: 1

# UVC camera, only for dabai, dabai DCW serial
uvc_camera.enable: false
uvc_camera.format: "mjpeg"
uvc_camera.vid: 0x0
uvc_camera.pid: 0x0
uvc_camera.retry_count: 100

color_roi.x : -1
color_roi.y : -1
color_roi.width: -1
color_roi.height: -1
depth_roi.x : -1
depth_roi.y : -1
depth_roi.width: -1
depth_roi.height: -1

# depth scale times
depth_scale : 1
publish_tf: true
tf_publish_rate: 10.0
reconnect_timeout: 6.0

Press <ctrl + o> and then <ctrl + x> to save and quit.

4. Pull docker images with:

husarion@rosbot:/home/husarion$
docker compose pull

5. Flashing the firmware

husarion@rosbot:/home/husarion$
docker stop rosbot microros || true && docker run \
--rm -it --privileged \
husarion/rosbot:humble \
/flash-firmware.py /root/firmware.bin

6. DDS configuration

Both Fast DDS and Cyclone DDS are preinstalled in ROS 2 Foxy system image for ROSbot 2 PRO, however the Fast DDS is preffered one. To enable it:

Update ~/.bashrc file by executing the following commands:

husarion@rosbot:/home/husarion$
echo "RMW_IMPLEMENTATION=rmw_fastrtps_cpp" >> ~/.bashrc
source ~/.bashrc

7. Launching ROS nodes

To launch basic ROSbot nodes, paste the following command in the ROSbot's terminal (depending on the OS images you use):

husarion@rosbot:/home/husarion$
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:

husarion@rosbot:/home/husarion$
ros2 daemon stop

Check available ROS topics:

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

ROS topic list

Manual ROSbot driving with teleop_twist_keyboard

Now launch a teleop_twist_keyboard ROS node for manual ROSbot control:

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

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

teleop twist keyboard

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.

danger

Next demos start ROSbot's containers in different configuration, so remember to stop the basic setup at first:

husarion@rosbot:/home/husarion/$
docker compose down
danger

Before starting the following projects, to avoid errors related to the SERIAL_PORT variable, execute two commands in the ROSbot 2 PRO terminal:

husarion@rosbot:/home/husarion/$
export SERIAL_PORT=/dev/ttyS4
husarion@rosbot:/home/husarion/$
echo "export SERIAL_PORT=/dev/ttyS4" >> ~/.bashrc

Find available projects below:

linkdescription
rosbot-gamepadControl the robot manually using a Logitech F710 gamepad
rosbot-mappingCreate a map (using slam_toolbox) of the unknow environment with ROSbot controlled in LAN or over the Internet
rosbot-navigationAutonomous 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.

map example