Skip to main content

Docker Images For Husarion's Robots

Newest OS images for Panther nad ROSbot come with pre-installed Docker and Docker Compose. Thanks to provided Docker images you can run software for Husarion's robots in different scenarios without additional requirements to host system other than Docker. That means you don't even need to use pre-installed ROS on robots host systems. 100% of software can run in Docker conatiners!

note

Remember that architectures of computers used in ROSbot (arm/v7) and ROSbot PRO (amd64) are different, so no all images working on ROSbot PRO will work on regular ROSbot

Summary

List of Docker images hosted on Husarion's Docker Hub profile:

ROS 1 Docker Images

Docker Hub repoGitHub repoROS versionTarget PlatformArchDescription
husarion/rosbotrosbot-docker Build/Publish Docker ImageMelodicROSbot ROSbot-PROamd64, arm/v7, arm64PySerial adapter to access ROS nodes on ROSbot's STM32 MCU
husarion/rplidarrplidar-docker Build/Publish Docker ImageMelodicROSbot ROSbot-PRO Pantheramd64, arm/v7, arm64An official repo for RPLIDAR A2/A3 by Slamtec, closed in a Docker image
husarion/astraastra-docker Build/Publish Docker ImageMelodicROSbot ROSbot-PRO Pantheramd64, arm/v7, arm64An official repo for Astra RGBD camera by Orbbec, closed in a Docker image
husarion/panther-lights-controllerpanther_lights Build/Publish Docker ImageNoeticPantherarm64Controlling front & rear 46 x pixel LED strip
husarion/panther-lights-schedulerpanther_lights Build/Publish Docker ImageNoeticPantheramd64, arm64Controlling front & rear 46 x pixel LED strip
husarion/panther-driverpanther_driver Build/Publish Docker ImageNoeticPantheramd64, arm64Low level control of Panther motors via CAN interface.
husarion/velocity-managerpanther_driver Build/Publish Docker ImageNoeticPantheramd64, arm64High level control of cmd_vel source selection
husarion/panther-gazebopanther_simulation Build/Publish Docker ImageNoeticPantheramd64, arm64Gazebo simulation model for Panther
husarion/webui-ros-joystickwebui-ros-joystick Build/Publish Docker ImageNoeticROSbot-PRO Pantheramd64, arm64A Node.js app providing a simple remote interface for robots
husarion/logitech-f710logitech_f710_ros Build/Publish Docker ImageNoeticROSbot-PRO Pantheramd64, arm64Controlling ROS robots with Logitech F710 gamepad

ROS 2 Docker Images

Docker Hub repoGitHub repoROS versionTarget PlatformArchDescription
husarion/ros2-desktop-vncros2-desktop-vnc Dockerhub push AMD64FoxyROSbot-PRO Pantheramd64, arm64A ROS 2 desktop with a LXDE graphical environment + noVNC.
husarion/nav2nav2-docker Build/Publish Docker ImageGalacticROSbot-PRO Pantheramd64, arm64Dockerized Nav2 nodes with custom Husarion launch.
husarion/rviz2rviz2-docker Build/Publish Docker ImageGalacticROSbot-PRO Pantheramd64, arm64Dockerized Rviz2 with Nav 2 plugins.
husarion/micro-ros-agentdocker-micro-ros Build/Publish Docker ImageGalacticROSbot-PRO Pantheramd64, arm64Micro-ROS agent - example. Created this fork becasue the official one is not shipped with arm64 support (as on Feb. 2022)

Useful 3rd Party Images

Docker Hub repoGitHub repoROS versionArchDescription
husarnet/husarnethusarnet/husarnetallamd64, arm/v7, arm64A P2P VPN network allowing you to connect to remote containers or hosts over the Internet
ros:foxy-ros1-bridgeosrf/docker_imagesFoxy, Noeticamd64, arm64ROS bridge allowing ROS 1 and ROS 2 nodes talk to each other

Examples

Panther + rviz + nav2

Control Panther from a Rviz running in your web browser.

docker-compose.yml
version: "2.3"

services:

# ROS Master
ros-master:
image: ros:noetic-ros-core
restart: on-failure
tty: true # docker run -t
command: stdbuf -o L roscore

# ROS Melodic rosbot hardware layer
rosbot:
image: husarion/rosbot
tty: true
restart: on-failure
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
- "SERIAL_PORT=/dev/ttyS4" # default: ttyS1 - rosbot2.0; ttyS4 - rosbot2.0 `pro
privileged: false
devices:
- "/dev/ttyS4" # must match environment SERIAL_PORT
command: roslaunch rosbot_description rosbot_docker.launch

# ROS Melodic Rplidar
rplidar:
image: husarion/rplidar:latest
restart: unless-stopped
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
devices:
- /dev/ttyUSB0
tty: true
command: roslaunch rplidar_ros rplidar_a3.launch # For Rosbot 2.0 PRO use roslaunch rplidar_ros rplidar_a3.launch

# ROS Noetic + ROS 2 Foxy
bridge:
image: ros:foxy-ros1-bridge
restart: on-failure
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
- "ROS_DOMAIN_ID=0"
command: ros2 run ros1_bridge dynamic_bridge

# ROS Foxy navigation
nav2:
image: husarion/nav2:foxy
tty: true
restart: on-failure
environment:
- "ROS_DOMAIN_ID=0"
command: ros2 launch husarion_nav2 bringup_both.launch.py

# ROS Foxy Rviz2 VNC
rviz2:
image: husarion/ros2-desktop-vnc:latest
restart: on-failure
enviroment:
- "ROS_DOMAIN_ID=0"
volumes:
- ./rosbot_pro.rviz:/root/.rviz2/default.rviz
ports:
- 6080:80
shm_size: '512m'

Launching

on Panther

execute docker-compose up in the terminal

on Laptop
  • open the following URL in your web browser: http://<Panther_Local_IP>:6080.
  • In the desktop environment provided by NoVNC, open terminal and execute: ros2 run rviz2 rviz2

Panther in Gazebo + rviz + nav2 (for Nvidia GPU)

Launch Panther simulation in Gazebo on your laptop that looks like this:

info

Prerequisites:

Make sure you have the following software installed on your laptop that will run the simulation:

Source code

Full source code is here

docker-compose.yml
version: "3.4"

services:
# ROS Galactic simulation
panther_gazebo:
image: husarion/panther-gazebo:galactic-latest
tty: true
runtime: nvidia
environment:
- "DISPLAY"
- "QT_X11_NO_MITSHM=1"
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,display
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
command: >
ros2 launch panther_gazebo panther.launch.py
use_gpu:=true

# ROS Galactic Navigation 2
nav2:
image: husarion/nav2:galactic-latest
tty: true
restart: on-failure
depends_on:
- panther_gazebo
volumes:
- ./config/nav2_params.yaml:/app/ros2_ws/src/husarion_nav2/config/nav2_params.yaml
- ./config/slam_toolbox.yaml:/app/ros2_ws/src/husarion_nav2/config/slam_toolbox.yaml
command:
- sh
- -c
- |
sleep 5
ros2 launch husarion_nav2 bringup_both.launch.py
note

you will find nav2_params.yaml and slam_toolbox.yaml files for this example here.

Launching

On your laptop go to the folder containing the docker-compose.yml file and execute:

xhost local:docker
docker-compose up

Extra notes

This docker-compose.yml will run Panther in simulation with Nvidia support. For more examples with and withoud Nvidia GPU support and custom Nav2 parameters reffer to examples here.