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:
You need to have docker in your system. For installing docker, refer to the official documentation at https://www.docker.com/.
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.
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.
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.
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 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
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.
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.
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.
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.
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.