Skip to main content

Docker Images

Newest OS images for Panther and 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 the host system other than Docker. That means you don't even need to use pre-installed ROS on robot's host systems. 100% of software can run in Docker containers.

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

Here's the list of Docker images hosted on Husarion's Docker Hub profile:

ImageDescriptionTagsArchitectures
husarion/rosbot
Docker images for ROSbot 2, ROSbot 2R and ROSbot 2 PRO robots.
humble
amd64  arm64  
melodic
amd64  arm  arm64  
melodic-simulation
amd64  
noetic
amd64  arm64  
noetic-simulation
amd64  
husarion/rplidar
Docker images for SLAMTEC lidars. RPLIDAR A2 is used in ROSbot 2 and 2R. A3 is used in ROSbot 2 PRO.
foxy
amd64  arm64  
galactic
amd64  arm64  
humble
amd64  arm64  
kinetic
amd64  arm  arm64  
melodic
amd64  arm  arm64  
noetic
amd64  arm64  
husarion/astra
Docker images for Orbecc depth sensors. Orbecc Astra is used in ROSbot 2, 2R and 2 PRO
foxy
amd64  arm64  
galactic
amd64  arm64  
humble
amd64  arm64  
kinetic
amd64  arm  arm64  
melodic
amd64  arm  arm64  
noetic
amd64  arm64  
husarion/ros
ROS docker images with modifications.
eloquent-ros1-bridge
amd64  arm  arm64  
foxy-ros1-bridge
amd64  arm64  
galactic-ros1-bridge
amd64  arm64  
husarion/navigation2
Nav2 navigation stack for ROS 2
foxy
amd64  arm64  
foxy-22-09-19
amd64  arm64  
galactic
amd64  arm64  
galactic-22-09-19
amd64  arm64  
humble
amd64  arm64  
humble-22-09-19
amd64  arm64  
husarion/slam-toolbox
Slam Toolbox packed in a Docker image for map building in ROS 2
foxy
amd64  arm64  
foxy-22-09-19
amd64  arm64  
galactic
amd64  arm64  
galactic-22-09-19
amd64  arm64  
humble
amd64  arm64  
humble-22-09-19
amd64  arm64  
husarion/rviz2
Prebuild Docker image with RViz2 and Nav2 plugin
foxy
amd64  arm64  
foxy-22-09-19
amd64  arm64  
foxy-22-10-06
amd64  arm64  
foxy-22-10-12
amd64  arm64  
galactic
amd64  arm64  
galactic-22-09-19
amd64  arm64  
galactic-22-10-06
amd64  arm64  
galactic-22-10-12
amd64  arm64  
humble
amd64  arm64  
humble-22-09-19
amd64  arm64  
humble-22-10-06
amd64  arm64  
humble-22-10-12
amd64  arm64  
husarion/rviz
RViz for visualizing state of ROS 1 system in a nice GUI
melodic
amd64  arm  arm64  
noetic
amd64  arm64  
husarion/plotjuggler
PlotJuggler ROS 2 tool for visualizing time series
humble
amd64  arm64  
husarion/webui-ros-joystick
https://github.com/husarion/webui-ros-joystick
noetic
amd64  arm64  
husarion/joy2twist
Controlling a mobile robot using a gamepad
galactic
amd64  arm64  
humble
amd64  arm64  
melodic
amd64  arm  arm64  
noetic
amd64  arm64  
husarion/ros2-desktop-vnc
A ROS 2 Foxy desktop container with a LXDE graphical environment available over noVNC.
amd64
amd64  
arm64
arm64  
latest
amd64  arm64  
husarion/panther
Docker image with a Panther ROS package
noetic
amd64  arm64  
husarion/panther-gazebo
Image for simulation of Panther in Gazebo
galactic-latest
amd64  arm64  
noetic-latest
amd64  arm64  

Another useful Docker images

Here's a list of 3rd party and non-ROS tools that are useful in ROS development:

ImageDescriptionTagsArchitectures
husarnet/husarnet
Peer-to-Peer VPN to connect your computers, microcontrollers and containers with zero configuration.
2.0.0
amd64  arm  arm64  
amd64
amd64  
arm64
arm64  
armhf
arm  
latest
amd64  arm  arm64  
husarion/omping
Dockerized omping - useful for debugging multicasting in ROS 2 docker setup
latest
amd64  arm64  
husarion/plotjuggler
PlotJuggler ROS 2 tool for visualizing time series
humble
amd64  arm64  
microros/micro-ros-agent
micro-ROS Agent application ready to use
foxy
amd64  arm64  
galactic
amd64  arm64  
humble
amd64  arm64  
latest
amd64  
rolling
amd64  arm64  
donowak/remote-desktop
Docker image providing remote desktop access to the host OS
lan
amd64  arm64  
vpn
amd64  arm64  
donowak/vulcanexus
Vulcanexus ROS 2 tool set
latest
amd64  

Using Docker images

The advised way of using Docker images is with Docker Compose. It allows starting multiple containers with different configurations described in compose file (see Examples for example compose files). For more information about using Docker and Docker Compose refer to the official Docker documentation.

Controlling Docker containers

Starting Docker containers:

# Within a folder with compose file
docker compose up
# To run in detached mode
docker compose up -d

Listing containers:

# List running containers
docker ps
# List all containers
docker ps -a

Stopping a running container:

docker stop <container>
# To stop all running containers
docker stop $(docker ps -q)

Remove a container:

docker container rm <container>
# remove all containers
docker container prune

Remove all unused Docker containers, networks, images:

docker system prune

Configuring Docker containers restart

The behavior of existing containers after they exit can be controlled using compose parameter called restart. Possible options are:

  • no - the container doesn’t restart under any circumstance,
  • always - the container always restarts,
  • on-failure - the container restarts if the exit code indicates an on-failure error,
  • unless-stopped - the container always restarts unless it was stopped arbitrarily, or by the Docker daemon.
note

For Husrion's robots in most cases unless-stopped configuration is used. This means Docker containers will be automatically restarted after the robot is turned off and on again.

Updating Docker containers

Docker images are frequently updated to improve performance, add new functionalities or fix existing bugs. To update an existing image follow the below steps:

  1. Stop all running containers.
docker stop $(docker ps -q)
  1. Remove all created containers.
docker container prune
  1. Pull a new Docker image.
docker pull <image>
# eg.
docker pull husarion/panther:noetic

After the pull process finishes, the Docker image is ready to use.

Examples

ROSbot 2 (Gazebo) + rviz2 + Slam toolbox + nav2

Control a simulation model of ROSbot 2 running in the Gazebo simulation environment from Rviz2 ROS 2 visualization tool. ROSbot is building a map and navigating autonomously thanks to Slam Toolbox and Navigation 2 (link to compose.*.yam)

services:

rviz:
image: husarion/rviz2:galactic
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
environment:
- DISPLAY=${DISPLAY:?err}
- LIBGL_ALWAYS_SOFTWARE=1
command: ros2 run rviz2 rviz2 -d /settings/rosbot2-nav2-demo.rviz

navigation:
image: husarion/navigation2:galactic
command: >
ros2 launch nav2_bringup navigation_launch.py
params_file:=/nav2_params/rosbot2_navigation.yaml
use_sim_time:=True
mapping:
image: husarion/slam-toolbox:galactic
command: >
ros2 launch slam_toolbox online_sync_launch.py
slam_params_file:=/slam_params/rosbot2.yaml
use_sim_time:=True
bridge:
image: husarion/ros:galactic-ros1-bridge
environment:
- ROS_MASTER_URI=http://ros-master:11311
command: ros2 run ros1_bridge dynamic_bridge

ros-master:
image: ros:noetic-ros-core
command: stdbuf -o L roscore

rosbot_simulation:
image: husarion/rosbot:noetic-simulation
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
environment:
- DISPLAY=${DISPLAY:?err}
- LIBGL_ALWAYS_SOFTWARE=1
- ROS_MASTER_URI=http://ros-master:11311
command: >
roslaunch --wait rosbot_bringup rosbot.launch

To launch the example create a compose.yaml file on your computer and run:

xhost +
docker compose up

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