artursg / docker

Docker-related material to setup, configure and develop with micro-ROS hardware.

Home Page:https://micro-ros.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker

This repository contains docker-related material to setup, configure and develop with micro-ROS These set of Dockerfiles provide ready-to-use environments and applications. The Docker images are available in dockerhub.

Avaiable images are listed below:

Image Description Status
base Base image with ROSDISTRO installation + micro-ROS specific build system. Used as base of any other micro-ROS images Docker Automated buildDocker Build StatusCompare Images
micro-ros-agent Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application Docker Automated buildDocker Build StatusCompare Images
micro-ros-demos Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality Docker Automated buildDocker Build StatusCompare Images
micro-ros-firmware Contains a firmware ws ready to configure and build micro-ROS Docker Automated buildDocker Build StatusCompare Images
micro-ros-olimex-nuttx Contains a ready to flash example for Olimex STM32 E407 Docker Automated buildDocker Build StatusCompare Images

Imgea hierarchy

Pre-requisite

You need to have docker in your system. For installing docker, refer to the official documentation at https://www.docker.com/.

Usage

To get an image, you use docker pull command:

  • e.g. docker pull microros/base

You can select the tag to use appending :tag to the image name

  • e.g. docker pull microros/base:crystal

Once you have the image locally, to start it use docker run

  • e.g. docker run -it microros/micro-ros-agent

-it allocates a pseudo-TTY for you and keeps stdin listening. Another used command is -v to map local files with docker container ones. -v is useful in case you may want to flash boards from within a Docker container.

base image

It is the base for the rest of the containers. It contains the necessary micro-ROS setup tools and dependencies. From this image, you can start any development targeting micro-ROS.

firmware image

This image as the base one, it is used as a starting point to those images using firmware. This image contains a firmware workspace setup and dependencies.

micro-ros-agent

This image purpose serves as a stand-alone application. It includes installation of the ROS 2 version selected by the tag along with a micro-ROS-Agent. The entry point of this image is directly the micro-ROS-Agent, so upon execution of docker run you will be facing micro-ROS-Agent command line input.

  • e.g. docker run -it --net=host microros/micro-ros-agent udp 9999

Will start micro-ROS-Agent listening UDP messages on port 9999

micro-ros-demos

micro-ros-demos is one of the example images. With this image, you can launch example applications using micro-ROS (Compiled for Linux boxes) This image entry point has a ROS 2 environment set up with micro-ROS examples. You can run regular ros2 tool to launch the examples.

  • eg: docker run -it --net=hot microros/micro-ros-demos ros2

The currently avaiable examples are:

  • complex_msg_publisher_c & complex_msg_publisher_cpp
  • complex_msg_subscriber_c & complex_msg_subscriber_cpp
  • int32_publisher_c & int32_publisher_cpp
  • int32_subscriber_c & int32_subscriber_cpp
  • string_publisher_c & string_publisher_cpp
  • string_subscriber_c & string_subscriber_cpp
  • rad0_actuator_c, rad0_altitude_sensor_c, rad0_control_cpp & rad0_display_c

micro-ros-olimex-nuttx

This image provides you with a ready-to-flash firmware for Olimex-stm32-e407 with demos embedded on it. To flash your device you need to map your host machine devices to the Docker container

  • e.g. docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb microros/micro-ros-olimex-nuttx:crystal

Once inside the container you can flash the board runing scripts/flash.sh from firmware/NuttX directory.

There you can find a publisher and a subscriber examples. Both examples use serial transport to communicate with a micro-ROS-Agent, so you should start one with the same transport (You can use the micro-ros-agent imagen to do so). Once a client-agent communication is stablished you can use ros2 tools to view the publications from the Olimex or to publish messages to it.

Automated builds

These Docker files are used for automatically create images on Docker Hub. These builds are tagged with the ROS 2 version they will be compatible with: e.g. crystal, dashing... The latest tag will always be the latest release of ROS 2.

These automatic builds has direct relationship with the content of the micro-ROS repositories:

Image Triggers
base https://github.com/micro-ROS/micro-ROS-build
firmware https://github.com/micro-ROS/apps
https://github.com/micro-ROS/NuttX
micro-ros-agent
micro-ros-demos https://github.com/micro-ROS/micro-ROS-demos
micro-ros-olimex-nuttx

Apart from GitHub repositories changes, a build could be triggered whenever the base image is updated on Docker Hub. Base images are specified in the FROM: directive in the Dockerfile.

About

Docker-related material to setup, configure and develop with micro-ROS hardware.

https://micro-ros.github.io


Languages

Language:Dockerfile 97.8%Language:Shell 2.2%