Skip to content
forked from micro-ROS/docker

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

License

Notifications You must be signed in to change notification settings

seasonycph/docker

 
 

Repository files navigation

micro-ROS Dockers

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:foxy

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:foxy

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, foxy... 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.

Purpose of the Project

This software is not ready for production use. It has neither been developed nor tested for a specific use case. However, the license conditions of the applicable Open Source licenses allow you to adapt the software to your needs. Before using it in a safety relevant setting, make sure that the software fulfills your requirements and adjust it according to any applicable safety standards, e.g., ISO 26262.

License

This repository is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

For a list of other open-source components included in this repository, see the file 3rd-party-licenses.txt.

Known Issues/Limitations

Please notice the following issues/limitations:

  • There is an unknown issue when dealing with serial ports shared with the micro-ROS agent running inside a Docker. Sometimes it works with a remarkable packet loss.

About

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

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 91.6%
  • Shell 8.4%