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 repo | GitHub repo | ROS version | Target Platform | Arch | Description |
---|---|---|---|---|---|
husarion/rosbot | rosbot-docker | Melodic | ROSbot ROSbot-PRO | amd64 , arm/v7 , arm64 | PySerial adapter to access ROS nodes on ROSbot's STM32 MCU |
husarion/rplidar | rplidar-docker | Melodic | ROSbot ROSbot-PRO Panther | amd64 , arm/v7 , arm64 | An official repo for RPLIDAR A2/A3 by Slamtec, closed in a Docker image |
husarion/astra | astra-docker | Melodic | ROSbot ROSbot-PRO Panther | amd64 , arm/v7 , arm64 | An official repo for Astra RGBD camera by Orbbec, closed in a Docker image |
husarion/panther-lights-controller | panther_lights | Noetic | Panther | arm64 | Controlling front & rear 46 x pixel LED strip |
husarion/panther-lights-scheduler | panther_lights | Noetic | Panther | amd64 , arm64 | Controlling front & rear 46 x pixel LED strip |
husarion/panther-driver | panther_driver | Noetic | Panther | amd64 , arm64 | Low level control of Panther motors via CAN interface. |
husarion/velocity-manager | panther_driver | Noetic | Panther | amd64 , arm64 | High level control of cmd_vel source selection |
husarion/panther-gazebo | panther_simulation | Noetic | Panther | amd64 , arm64 | Gazebo simulation model for Panther |
husarion/webui-ros-joystick | webui-ros-joystick | Noetic | ROSbot-PRO Panther | amd64 , arm64 | A Node.js app providing a simple remote interface for robots |
husarion/logitech-f710 | logitech_f710_ros | Noetic | ROSbot-PRO Panther | amd64 , arm64 | Controlling ROS robots with Logitech F710 gamepad |
ROS 2 Docker Images​
Docker Hub repo | GitHub repo | ROS version | Target Platform | Arch | Description |
---|---|---|---|---|---|
husarion/ros2-desktop-vnc | ros2-desktop-vnc | Foxy | ROSbot-PRO Panther | amd64 , arm64 | A ROS 2 desktop with a LXDE graphical environment + noVNC. |
husarion/nav2 | nav2-docker | Galactic | ROSbot-PRO Panther | amd64 , arm64 | Dockerized Nav2 nodes with custom Husarion launch. |
husarion/rviz2 | rviz2-docker | Galactic | ROSbot-PRO Panther | amd64 , arm64 | Dockerized Rviz2 with Nav 2 plugins. |
husarion/micro-ros-agent | docker-micro-ros | Galactic | ROSbot-PRO Panther | amd64 , arm64 | Micro-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 repo | GitHub repo | ROS version | Arch | Description |
---|---|---|---|---|
husarnet/husarnet | husarnet/husarnet | all | amd64 , arm/v7 , arm64 | A P2P VPN network allowing you to connect to remote containers or hosts over the Internet |
ros:foxy-ros1-bridge | osrf/docker_images | Foxy, Noetic | amd64 , arm64 | ROS 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.
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
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.