Skip to content

Docker

When you start the Ricbot simulation environment using the 'run.bash' script, it opens a terminal window with eight tabs, each representing a different container. Details about what each container does and how they are built are provided below. Information about the terminal window layout can be found in the 'terminator.conf' file.

1. ricbot-1

The first container is built on the Dockerfile-robot and sets up a basic ROS (Robot Operating System) environment that handles drivers, and publishes description.

Base Image:

  • Uses the official ROS image as the base, with the ROS distribution specified by the ROS_DISTRO build argument.

Environment Variables:

  • EIGEN_DIR=/root/eigen: Directory for Eigen library

  • COLCON_WS=/root/colcon_ws: Colcon workspace directory

  • COLCON_WS_SRC=/root/colcon_ws/src: Source directory of the colcon workspace

  • PYTHONWARNINGS: Ignores specific setuptools deprecation warning

  • DEBIAN_FRONTEND=noninteractive: Prevents interactive prompts during package installation

ROS Dependencies:

Installs the following ROS packages: - xacro - rplidar-ros - realsense2-camera - kobuki-ros-interfaces - kobuki-velocity-smoother - navigation2 - nav2-bringup

Custom Entrypoint:

  • Copies and sets permissions for a custom entrypoint script: ‘/ros_entrypoint.bash’

  • ENTRYPOINT serves as the starting point for a Docker container’s runtime process.

  • In this dockerfile it will source the setup file from the colcon workspace.

Additional System Dependencies:

Installs Python-related packages

  • python3-pip

  • python3-argcomplete

  • python3-netifaces

  • python3-yaml

  • python3-distro

Fleet Manager Client:

  • Copies fleet manager client to the colcon workspace and /opt/apps/fleet-client

  • Installs its requirements and builds the protobuf files

Custom ROS Packages:

Copies the following custom ROS packages to the colcon workspace:

  • ricbot_description

  • ricbot_bringup

  • mapdesc_ros

  • mapdesc_msgs

  • ricbot_navigation

MapDesc Setup:

  • Installs MapDesc requirements

  • Copies MapDesc source to “/opt/mapdescand” installs it

Build Process:

  1. Builds the initial colcon workspace

  2. Copies custom packages

  3. Rebuilds the colcon workspace with all packages

2. Viz-1

This container sets up a ROS (Robot Operating System) environment focused on the visualization tool rviz2 for the Ricbot project.

Base Image:

  • Uses the official ROS image as the base, with build argument “ROS_DISTRO” that can be specified when building the image.

Environment Variables:

  • COLCON_WS=/root/colcon_ws: Colcon workspace directory

  • COLCON_WS_SRC=/root/colcon_ws/src: Source directory of the colcon workspace

  • PYTHONWARNINGS: Ignores specific setuptools deprecation warning

  • DEBIAN_FRONTEND=noninteractive: Prevents interactive prompts during package installation

ROS Dependencies:

Installs the following ROS packages:

  • rviz2 (3D visualization tool for ROS)

  • rqt-robot-steering (GUI plugin for steering robots)

Custom Entrypoint:

  • Copies and sets permissions for a custom entrypoint script: “/ros_entrypoint.bash”

  • ENTRYPOINT serves as the starting point for a Docker container’s runtime process.

  • In this dockerfile it will source the setup file from the colcon workspace.

Custom ROS Packages:

Copies the following custom ROS packages to the colcon workspace:

  • ricbot_description

  • ricbot_bringup

Build Process:

  1. Copies custom packages to the workspace

  2. Sources the ROS setup file

  3. Builds the colcon workspace

3. gz_sim-1

This Dockerfile sets up a ROS 2 and Gazebo Simulator environment for the Ricbot project.

Base Image:

  • Uses a custom Gazebo Simulator image ‘brean/gz_sim’ as the base

  • The image version is determined by two build arguments and are specified in teh docker-compose file:

  • ROS_DISTRO: ROS 2 distribution

  • GZ_VERSION: Gazebo version

node.py
  gz_sim:
    # gazebo installation for the robot
    image: brean/ricbot_gz_sim:humble-harmonic
    build:
      context: ./
      dockerfile: ./docker/Dockerfile-gzsim
      args:
        ROS_DISTRO: humble
        GZ_VERSION: harmonic

Environment Variables:

  • COLCON_WS=/root/colcon_ws: Colcon workspace directory

  • COLCON_WS_SRC=/root/colcon_ws/src: Source directory of the colcon workspace

Custom ROS Packages:

Copies the following custom ROS packages to the colcon workspace:

  • ricbot_gzsim: Gazebo simulation package for Ricbot

  • ricbot_description: Robot description package (needed for Gazebo to find the robot models)

Custom Entrypoint:

  • Copies and sets permissions for a custom entrypoint script: ‘/ros_entrypoint.bash’

  • ENTRYPOINT serves as the starting point for a Docker container’s runtime process.

  • In this dockerfile it will source the setup file from the colcon workspace.

Build Process:

  1. Copies custom packages to the workspace

  2. Sources the ROS setup file

  3. Builds the colcon workspace

Default Command:

The default command launches the Ricbot simulation from the launch directory of the copied ricbot_gzsim package.

4. Bash

Intereactive bash shell environment in the container. The bash environment can be used to manually execute commands, to test new configuration, and for debugging purposes.

5. Fleet-Manger

6. Fleet-Manger-Svelte

7. Fleet-Manger-ROS

8. Helloric-nav:

This container is based on the file Dockerfile-nav. It uses the official ROS Docker images as the base and the ${ROS_DISTRO} build argument specifying different ROS 2 distributions during build time. In our case we are using humble, and the argument is specified in the dockercompose file.

node.py
  helloric-nav:
    container_name: helloric-nav
    build:
      context: ./
      dockerfile: docker/Dockerfile-nav
      args:
        ROS_DISTRO: humble

Installing Necessary Packages:

python-pip: Python package installer.

python3-opencv:  Opencv is used for vision-based navigation tasks and we used it in the mapdesc to convert a map into different formats.

std-msgs, geometry-msgs and diagnostic-msgs: standrd message packages for communication between ROS nodes.

navigation2 and nav2-bringup:  ROS 2 Navigation Stack packages that provide necessary navigation functionalities for ricbot.

ament-cmake: the build system for CMake based packages in ROS 2

Python Dependencies:

  • Upgrades opencv-python

  • Installs requirements from ‘/tmp/requirements.txt’

Environment Setup:

  • Sets ‘COLCON_WS=/root/colcon_ws’ as the colcon workspace

  • Sets ‘COLCON_WS_SRC=/root/colcon_ws/src’ as the source directory of the colcon workspace

Custom Entrypoint:

  • Copies and sets permissions for a custom entrypoint script: /ros_entrypoint.bash

  • ENTRYPOINT serves as the starting point for a Docker container’s runtime process.

  • In this dockerfile it will source the setup file from the colcon workspace.

MapDesc Setup:

  • Copies MapDesc requirements and installs them

  • Copies MapDesc source to ‘/opt/mapdesc’ and installs it

ROS Packages:

Copies the following ROS packages to the colcon workspace:

  • mapdesc_ros

  • mapdesc_msgs

  • ricbot_navigation

Build:

  • Sources the ROS setup file

  • Builds the colcon workspace