From 6672a8d230af47ecb901b591290341eeb1815614 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Fri, 21 Jun 2019 10:12:44 +0200 Subject: [PATCH 01/19] Fix dockerfile: use correct dockerhub base image. --- .../NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile b/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile index 823f464..b5a8f23 100644 --- a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile +++ b/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile @@ -1,4 +1,4 @@ -FROM microros_linux:latest +FROM microros/linux:latest # Install essential required for Nuttx complilation RUN apt install -y bison \ flex \ From 2bbb87d3e1c8e343f324265a4e947d027cb40f83 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Tue, 24 Sep 2019 13:29:44 +0200 Subject: [PATCH 02/19] Add new base docker base. --- base/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 base/Dockerfile diff --git a/base/Dockerfile b/base/Dockerfile new file mode 100644 index 0000000..1477aa6 --- /dev/null +++ b/base/Dockerfile @@ -0,0 +1,9 @@ +FROM ros:crystal + +RUN apt update && apt install -y curl + +RUN mkdir -p uros_ws/src +WORKDIR uros_ws/src +RUN git clone --recursive --single-branch --branch crystal https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build +RUN . /opt/ros/crystal/setup.sh && colcon build --packages-select micro_ros_setup +RUN . /opt/ros/crystal/setup.sh && rosdep update From 138b6392138d2a53893e91b3437a102e0b3c270f Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Tue, 24 Sep 2019 13:31:19 +0200 Subject: [PATCH 03/19] Add micro-ROS-Agent docker. --- micro-ROS-Agent/Dockerfile | 9 +++++++++ micro-ROS-Agent/micro-ros_entrypoint.sh | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 micro-ROS-Agent/Dockerfile create mode 100755 micro-ROS-Agent/micro-ros_entrypoint.sh diff --git a/micro-ROS-Agent/Dockerfile b/micro-ROS-Agent/Dockerfile new file mode 100644 index 0000000..02360e9 --- /dev/null +++ b/micro-ROS-Agent/Dockerfile @@ -0,0 +1,9 @@ +FROM microros/base:crystal + +WORKDIR /uros_ws/src +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_agent_ws.sh && colcon build + +# setup entrypoint +COPY ./micro-ros_entrypoint.sh / +ENTRYPOINT ["/bin/sh", "/micro-ros_entrypoint.sh"] +CMD ["--help"] diff --git a/micro-ROS-Agent/micro-ros_entrypoint.sh b/micro-ROS-Agent/micro-ros_entrypoint.sh new file mode 100755 index 0000000..3ff7ef0 --- /dev/null +++ b/micro-ROS-Agent/micro-ros_entrypoint.sh @@ -0,0 +1,3 @@ +. "/opt/ros/$ROS_DISTRO/setup.sh" +. "/uros_ws/src/install/local_setup.sh" +exec ros2 run micro_ros_agent micro_ros_agent $@ From ced89f6823cf1bf153d0a79418b286c3119a3a72 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 11:44:18 +0200 Subject: [PATCH 04/19] Add micro-ROS-demos image. Fix base image. Update README. Refs #6397. --- README.md | 31 +++-- base/Dockerfile | 2 +- micro-ROS-demos/Dockerfile | 15 +++ micro-ROS-demos/micro-ros_entrypoint.sh | 3 + windows/Dockerfile | 151 ------------------------ windows/README.md | 27 ----- 6 files changed, 41 insertions(+), 188 deletions(-) create mode 100644 micro-ROS-demos/Dockerfile create mode 100755 micro-ROS-demos/micro-ros_entrypoint.sh delete mode 100644 windows/Dockerfile delete mode 100644 windows/README.md diff --git a/README.md b/README.md index 9d0e0fd..747a952 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,46 @@ # Docker This repository contains docker-related material to setup, configure and develop with [micro-ROS](https://microros.github.io/) -The docker files are split in folders that depending the target where the software is executed. +These set of dockerfiles provide ready-to-use environments and applications. +The docker images can be found in [dockerhub](https://hub.docker.com/u/microros). -For microcontroller related material, please check `Embedded` folder and `Linux` or `windows` folders for setting up tools for executing the software at your Linux or Windows machine. -In each target, precompiled examples are provided to getting started easily. +Avaiable images are listed below: +| Image | Description | +|-------|-------------| +| Base | Base image with ROSDISTRO installation + micro-ROS specific build system. Used as base of any other micro-ROS image | +| micro-ROS-Agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | +| micro-ROS-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | +| micro-ROS-NuttX | Contains a firmware ws ready to configure and build micro-ROS | +| micro-ROS-NuttX-Olimex | Contains a ready to flash example for Olimex STM32 E407 | + +## Pre-requisite + +You need to have docker in your system. For installing docker, refer to https://www.docker.com/. -## Linux +## Status + +Images are automatically build in dockerhub, here you can find the current status of each image -**Development:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/linux.svg?logo=docker)](https://hub.docker.com/r/microros/linux/) +**Base:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/linux.svg?logo=docker)](https://hub.docker.com/r/microros/linux/) [![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/linux.svg?logo=docker)](https://hub.docker.com/r/microros/linux/) [![Compare Images](https://images.microbadger.com/badges/image/microros/linux.svg)](https://microbadger.com/images/microros/linux) -**Linux Client:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_linux.svg?logo=docker)](https://hub.docker.com/r/microros/client_linux/) +**micro-ROS-Agent:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_linux.svg?logo=docker)](https://hub.docker.com/r/microros/client_linux/) [![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/client_linux.svg?logo=docker)](https://hub.docker.com/r/microros/client_linux/) [![Compare Images](https://images.microbadger.com/badges/image/microros/client_linux.svg)](https://microbadger.com/images/microros/client_linux) -**Linux Agent:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/agent_linux.svg?logo=docker)](https://hub.docker.com/r/microros/agent_linux/) +**micro-ROS-demos:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/agent_linux.svg?logo=docker)](https://hub.docker.com/r/microros/agent_linux/) [![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/agent_linux.svg?logo=docker)](https://hub.docker.com/r/microros/agent_linux/) [![Compare Images](https://images.microbadger.com/badges/image/microros/agent_linux.svg)](https://microbadger.com/images/microros/agent_linux) ## NuttX -**stm32-e407:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/stm32-e407/) +**micro-ROS-firmware:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/stm32-e407/) [![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/stm32-e407/) [![Compare Images](https://images.microbadger.com/badges/image/microros/stm32-e407.svg)](https://microbadger.com/images/microros/stm32-e407) -**Client stm32-e407:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/client_stm32-e407/) +**micro-ROS-NuttX-:nt stm32-e407:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/client_stm32-e407/) [![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/client_stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/client_stm32-e407/) [![Compare Images](https://images.microbadger.com/badges/image/microros/client_stm32-e407.svg)](https://microbadger.com/images/microros/client_stm32-e407/) diff --git a/base/Dockerfile b/base/Dockerfile index 1477aa6..b6673a4 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -4,6 +4,6 @@ RUN apt update && apt install -y curl RUN mkdir -p uros_ws/src WORKDIR uros_ws/src -RUN git clone --recursive --single-branch --branch crystal https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build +RUN git clone --recursive --single-branch --branch feature/client_ws https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build RUN . /opt/ros/crystal/setup.sh && colcon build --packages-select micro_ros_setup RUN . /opt/ros/crystal/setup.sh && rosdep update diff --git a/micro-ROS-demos/Dockerfile b/micro-ROS-demos/Dockerfile new file mode 100644 index 0000000..cd9868f --- /dev/null +++ b/micro-ROS-demos/Dockerfile @@ -0,0 +1,15 @@ +FROM microros/base:Crystal + +WORKDIR /uros_ws/src + +RUN apt update && apt install -y liblog4cxx-dev clang + +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_client_ws.sh + +RUN . /opt/ros/crystal/setup.sh && rosdep install -y --from-paths src -i src --skip-keys="microxrcedds_client microcdr rosidl_typesupport_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_opensplice_cpp rosidl_typesupport_opensplice_c rmw_connext_cpp rmw_opensplice_cpp" + +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && colcon build --metas src --cmake-args -DBUILD_SHARED_LIBS=ON + +# setup entrypoint +COPY ./micro-ros_entrypoint.sh / +ENTRYPOINT ["/bin/sh", "/micro-ros_entrypoint.sh"] \ No newline at end of file diff --git a/micro-ROS-demos/micro-ros_entrypoint.sh b/micro-ROS-demos/micro-ros_entrypoint.sh new file mode 100755 index 0000000..ef98b7f --- /dev/null +++ b/micro-ROS-demos/micro-ros_entrypoint.sh @@ -0,0 +1,3 @@ +. "/opt/ros/$ROS_DISTRO/setup.sh" +. "/uros_ws/src/install/local_setup.sh" +exec $@ diff --git a/windows/Dockerfile b/windows/Dockerfile deleted file mode 100644 index 98bba77..0000000 --- a/windows/Dockerfile +++ /dev/null @@ -1,151 +0,0 @@ -FROM microsoft/windowsservercore:latest - -ENV chocolateyUseWindowsCompression false - -#COPY software C:/software - -# Install chocolatey and packages -RUN powershell -Command \ - iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); \ - choco feature disable --name showDownloadProgress; \ - choco install jre8 --version 8.0.181 -y --use-system-powershell; \ - choco install cmake python3 -y - # choco install git --params '/GitAndUnixToolsOnPath /NoShellIntegration /NoCredentialManager /NoGitLfs /SChannel' -y - # choco install microsoft-build-tools --version 15.0.26320.2 -y; - -# Install visual studio -RUN powershell -Command iwr https://aka.ms/vs/15/release/vs_buildtools.exe -OutFile C:\vs_buildtools.exe -RUN call C:\vs_buildtools.exe --quiet --wait --norestart --nocache \ - --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended \ - --add Microsoft.VisualStudio.Component.VC.140 -RUN powershell -Command Remove-Item -path C:\vs_buildtools.exe - -RUN setx PATH "C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Java\jre1.8.0_181\bin;C:\Python37;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Cmake\bin;%PATH%" -#RUN setx GTEST_ROOT "C:\software\googletest\install" -#RUN setx GMOCK_ROOT "C:\software\googletest\install" - -ENTRYPOINT ["cmd", "/C", "choco", "install", "git", "--params '/GitAndUnixToolsOnPath /NoShellIntegration /NoCredentialManager /NoGitLfs /SChannel'", "-y", "&", "cmd", "/C"] - - -# Install OpenSSL -RUN powershell -Command iwr https://slproweb.com/download/Win64OpenSSL-1_1_1.exe -OutFile C:\Win64OpenSSL.exe; \ - iwr https://slproweb.com/download/Win32OpenSSL-1_1_1.exe -OutFile C:\Win32OpenSSL.exe -RUN call C:\Win64OpenSSL.exe /silent /verysilent /sp- /suppressmsgboxes -RUN powershell -Command Remove-Item -path C:\Win64OpenSSL.exe -RUN call C:\Win32OpenSSL.exe /silent /verysilent /sp- /suppressmsgboxes -RUN powershell -Command Remove-Item -path C:\Win32OpenSSL.exe -RUN setx OPENSSL64_ROOT "C:\Program Files\OpenSSL-Win64" -RUN setx OPENSSL32_ROOT "C:\Program Files (x86)\OpenSSL-Win32" -RUN setx PATH "C:\Program Files\OpenSSL-Win64;C:\Program Files (x86)\OpenSSL-Win32;%PATH%" - - -###################################################################################################### - - -#> Generate Download folder -RUN mkdir C:\Downloads - - -#> Install chocolatey -#RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" - - -#> Upgrade Choco repos -RUN choco upgrade chocolatey - - -#> Install python -RUN choco install -y python - - - -#> Install SSL -#RUN choco install -y openssl.light - - -#> Install visualstudio -#ADD https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15# C:\Downloads\VS2017_install.exe -#COPY vs_community.exe C:\\Downloads\\VS2017_install.exe -#RUN cmd /k C:\Downloads\VS2017_install.exe --wait --norestart --nocache --all -#RUN choco install -y visualstudio2017professional -#RUN choco install -y visualstudio2017buildtools -#RUN choco install -y visualstudio2017community - - -#> Install OpenCV -RUN choco install -y opencv --pre - - -#> Install git -RUN choco install -y git - - -#> Install patch -RUN choco install -y patch - - -#> Update the latest version of setuptools and pip -RUN python -m pip install -U setuptools pip -#RUN py -m pip install -U setuptools pip - - -#> Update some python dependencies for command-line tools -RUN python -m pip install -U catkin_pkg empy pyparsing pyyaml setuptools -#RUN py -m pip install -U catkin_pkg empy pyparsing pyyaml setuptools - - -#> Install vcstool -RUN pip install -U vcstool -#RUN py -m pip install -U vcstool - - -#> Install colcon -RUN pip install -U colcon-common-extensions -#RUN py -m pip install -U colcon-common-extensions - - -#> Install curl -RUN choco install -y curl - - -#> Install CMake -RUN choco install -y cmake - - -#> Install testing tools like pytest and others -RUN pip install -U pytest coverage mock pep257 flake8 pydocstyle -#RUN py -m pip install -U pytest coverage mock - - -#> Install cppcheck -RUN choco install -y cppcheck - - -#> Install miscellanious -RUN mkdir C:\choco_downloads -ADD https://github.com/ros2/choco-packages/releases/download/2018-06-12-1/asio.1.12.1.nupkg "C:\Downloads\asio.1.12.1.nupkg" -ADD https://github.com/ros2/choco-packages/releases/download/2018-06-12-1/eigen.3.3.4.nupkg "C:\Downloads\eigen.3.3.4.nupkg" -ADD https://github.com/ros2/choco-packages/releases/download/2018-06-12-1/tinyxml-usestl.2.6.2.nupkg "C:\Downloads\tinyxml-usestl.2.6.2.nupkg" -ADD https://github.com/ros2/choco-packages/releases/download/2018-06-12-1/tinyxml2.6.0.0.nupkg "C:\Downloads\tinyxml2.6.0.0.nupkg" -RUN choco install -y -s C:\Downloads\ asio eigen tinyxml-usestl tinyxml2 - - -#> Configurar variables de entorno -RUN setx -m OpenCV_DIR "C:\opencv" -#RUN setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg -RUN setx PATH "C:\Program Files\Cppcheck;%PATH%" -RUN setx PATH "C:\Program Files\CMake\bin;%PATH%" -RUN setx PATH "C:\opencv\x64\vc15\bin;%PATH%" -RUN setx PATH "C:\Python37\Scripts;%PATH%" -RUN setx PATH "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\;%PATH%" -#RUN setx PATH "C:\OpenSSL-Win64\bin;%PATH%" - - -#> Restore the default Windows shell for correct batch processing below. -#SHELL ["cmd", "/S", "/C"] - - -#> Configure entry point -ENTRYPOINT ["powershell"] -ENTRYPOINT ["cmd", "/K", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\VsDevCmd.bat"] - diff --git a/windows/README.md b/windows/README.md deleted file mode 100644 index e1827f9..0000000 --- a/windows/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Environment for micro-ROS on Windows - -* PLATFORM: Windows - -This image contains all the requirements to compile and run micro-ROS in a Windows environment. - -* ROS 2 build environment. -* Required windows installations. - -## Build - -Due to Docker Hub limitations the only change is to get the image is to build it yourself: - -```cmd -docker build -t microros_windows . -``` - -## Run - -Access the container with the following command: - -```bash -docker run -it microros_windows -``` - -At this point, you should be in an environment ready to build and run micro-ROS. -Them you can start the [install and run guide](https://github.com/microROS/micro-ROS-doc/blob/master/docs/install_and_run.md). \ No newline at end of file From 256e65ced8d4206235ed752b8b34f517a95027ae Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 11:47:08 +0200 Subject: [PATCH 05/19] Remove old Linux images. Refs #6397. --- Linux/README.md | 3 - Linux/development/README.md | 1 - .../micro-ROS_development/Dockerfile | 108 ------------------ .../micro-ROS_development/README.md | 34 ------ .../Agent_Micro_XRCE-DDS/README.md | 3 - .../Agent_micro-ROS/Dockerfile | 18 --- .../Agent_micro-ROS/README.md | 3 - .../Client_Micro_XRCE-DDS/README.md | 3 - .../Client_micro-ROS/Dockerfile | 26 ----- .../Client_micro-ROS/README.md | 3 - Linux/precompiled_examples/README.md | 18 --- 11 files changed, 220 deletions(-) delete mode 100644 Linux/README.md delete mode 100644 Linux/development/README.md delete mode 100644 Linux/development/micro-ROS_development/Dockerfile delete mode 100644 Linux/development/micro-ROS_development/README.md delete mode 100644 Linux/precompiled_examples/Agent_Micro_XRCE-DDS/README.md delete mode 100644 Linux/precompiled_examples/Agent_micro-ROS/Dockerfile delete mode 100644 Linux/precompiled_examples/Agent_micro-ROS/README.md delete mode 100644 Linux/precompiled_examples/Client_Micro_XRCE-DDS/README.md delete mode 100644 Linux/precompiled_examples/Client_micro-ROS/Dockerfile delete mode 100644 Linux/precompiled_examples/Client_micro-ROS/README.md delete mode 100644 Linux/precompiled_examples/README.md diff --git a/Linux/README.md b/Linux/README.md deleted file mode 100644 index d6d7c54..0000000 --- a/Linux/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Linux Development tools - -This folder contains Ubuntu based development and pre-compiled examples in order to run them in Linux host machine. Base image provides a base Ubuntu image to build from. diff --git a/Linux/development/README.md b/Linux/development/README.md deleted file mode 100644 index 33d82c1..0000000 --- a/Linux/development/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder contains Linux Ubuntu Docker files for development purposes, where ROS 2 and micro-ROS tools are installed. \ No newline at end of file diff --git a/Linux/development/micro-ROS_development/Dockerfile b/Linux/development/micro-ROS_development/Dockerfile deleted file mode 100644 index 5de0098..0000000 --- a/Linux/development/micro-ROS_development/Dockerfile +++ /dev/null @@ -1,108 +0,0 @@ -FROM ubuntu:latest - -# Change work dir -WORKDIR /root - - -# Upgrade apt -RUN apt update -RUN apt upgrade -y - -# Install required packages for the below steps -RUN apt install -y wget \ - curl \ - gnupg \ - gnupg2 \ - lsb-core \ - locales \ - software-properties-common - -# Add ROS2 repo key -RUN wget http://repo.ros2.org/repos.key -RUN apt-key add repos.key -RUN rm repos.key -RUN sh -c 'echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list' - -# Configure locale -RUN locale-gen en_US en_US.UTF-8 -RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -ENV LANG='en_US.UTF-8' -ENV LANGUAGE='en_US:en' -ENV LC_ALL='en_US.UTF-8' -ENV DEBIAN_FRONTEND=noninteractive - -# Install essential dependencies -RUN apt update -RUN apt install -y build-essential \ - cmake \ - git \ - python3-colcon-common-extensions \ - python3-pip \ - python-rosdep \ - python3-vcstool \ - clang \ - clang-tidy \ - pyqt5-dev \ - pyqt5-dev-tools \ - cppcheck \ - graphviz \ - libgraphviz-dev - -# Upgrade pip -RUN python3 -m pip install --upgrade pip -RUN python3 -m pip install -U argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest \ - pytest-cov \ - pytest-runner \ - pytest-repeat \ - pytest-rerunfailures \ - setuptools \ - mock \ - git+https://github.com/lark-parser/lark.git@0.7b \ - pydot \ - pygraphviz - -# Install asio (For fastrtps) -RUN apt install --no-install-recommends -y \ - libasio-dev \ - libtinyxml2-dev - -# Micellanus -RUN apt install -y libpcre3 \ - libpcre3-dev \ - zlibc \ - zlib1g \ - zlib1g-dev \ - xorg \ - openbox \ - libxaw7-dev \ - libfreetype6-dev \ - libglu1-mesa-dev freeglut3-dev mesa-common-dev \ - qt5-default \ - libogre-1.9-dev \ - libxrandr-dev \ - libopencv-dev \ - libcurl4-openssl-dev \ - libcurlpp-dev \ - gdbserver - -# Install eigen lib -RUN wget http://bitbucket.org/eigen/eigen/get/3.3.5.tar.bz2 -O eigen.tar.bz2 -RUN tar -jxvf eigen.tar.bz2 --one-top-level=eigen -RUN (cd eigen/* && mkdir build && cd build && cmake .. && make && make install) -RUN rm eigen eigen.tar.bz2 -rf - -#-------- - -# Install java (For Jenkins) -RUN apt install -y openjdk-8-jdk -ENV JAVA_HOME "/usr/lib/jvm/java-8-openjdk-amd64/" diff --git a/Linux/development/micro-ROS_development/README.md b/Linux/development/micro-ROS_development/README.md deleted file mode 100644 index a4dcbdc..0000000 --- a/Linux/development/micro-ROS_development/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Environment for micro-ROS on Linux - -* PLATFORM: Linux Ubuntu - -This image contains all the requirements to compile and run micro-ROS in a Linux environment. - -* ROS 2 build environment. -* Linux required packages. - -## Build - -There are two options to get the image. - -1. Build your own the image using the docker file: - - ```bash - docker build -t microros_linux . - ``` - -1. Pull the image from Docker Hub. - ```bash - docker pull microros/linux - ``` - -## Run - -Access the container with the following command: - -```bash -docker run -it microros/linux -``` - -At this point, you should be in an environment ready to build and run micro-ROS. -Them you can start the [install and run guide](https://github.com/microROS/micro-ROS-doc/blob/master/docs/install_and_run.md). \ No newline at end of file diff --git a/Linux/precompiled_examples/Agent_Micro_XRCE-DDS/README.md b/Linux/precompiled_examples/Agent_Micro_XRCE-DDS/README.md deleted file mode 100644 index a26dc5f..0000000 --- a/Linux/precompiled_examples/Agent_Micro_XRCE-DDS/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# micro-XRCE Agent Quick Start - -Contains Docker files with micro-XRCE Agent example. diff --git a/Linux/precompiled_examples/Agent_micro-ROS/Dockerfile b/Linux/precompiled_examples/Agent_micro-ROS/Dockerfile deleted file mode 100644 index 33ec885..0000000 --- a/Linux/precompiled_examples/Agent_micro-ROS/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM microros/linux:latest - - -# Create work space -RUN mkdir -p ~/agent_ws/src - -# Import ros packages -RUN wget https://raw.githubusercontent.com/micro-ROS/micro-ROS-doc/master/repos/agent_minimum.repos -O ~/agent_ws/micro_ros.repos -RUN vcs import ~/agent_ws/src < ~/agent_ws/micro_ros.repos - -# Build Agent -RUN (cd ~/agent_ws && colcon build --cmake-args -DVERBOSE=ON) - -# Add agent to user bin folder -RUN ln -s ~/agent_ws/install/uros_agent/lib/uros_agent/uros_agent /usr/bin/ - -# Add local setups -RUN echo . ~/agent_ws/install/./local_setup.bash >> .bashrc diff --git a/Linux/precompiled_examples/Agent_micro-ROS/README.md b/Linux/precompiled_examples/Agent_micro-ROS/README.md deleted file mode 100644 index cea2467..0000000 --- a/Linux/precompiled_examples/Agent_micro-ROS/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Agent Quick Start - -This docker image has a ROS2 workspace with a built Micro-ROS agent ready to be run on a Linux system. The purpose of this image is to quickly run a Micro-ROS agent. diff --git a/Linux/precompiled_examples/Client_Micro_XRCE-DDS/README.md b/Linux/precompiled_examples/Client_Micro_XRCE-DDS/README.md deleted file mode 100644 index 01b9988..0000000 --- a/Linux/precompiled_examples/Client_Micro_XRCE-DDS/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# micro-XRCE Client Quick Start - -Contains Docker files with micro-XRCE Client example. diff --git a/Linux/precompiled_examples/Client_micro-ROS/Dockerfile b/Linux/precompiled_examples/Client_micro-ROS/Dockerfile deleted file mode 100644 index a3be9d5..0000000 --- a/Linux/precompiled_examples/Client_micro-ROS/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM microros/linux:latest - -# Create work space -RUN mkdir -p ~/client_ws/src - -# Import ros packages -RUN wget https://raw.githubusercontent.com/micro-ROS/micro-ROS-doc/master/repos/client_minimum.repos -O ~/client_ws/micro_ros.repos - -RUN vcs import ~/client_ws/src < ~/client_ws/micro_ros.repos - -# Build CLient -RUN (cd ~/client_ws && colcon build --cmake-args -DBUILD_SHARED_LIBS=ON) - -# Add examples into user bin folder -RUN ln -s ~/client_ws/install/int32_publisher_c/lib/int32_publisher_c/int32_publisher_c /usr/bin/ -RUN ln -s ~/client_ws/install/int32_subscriber_c/lib/int32_subscriber_c/int32_subscriber_c /usr/bin/ - -RUN ln -s ~/client_ws/install/string_publisher_c/lib/string_publisher_c/string_publisher_c /usr/bin/ -RUN ln -s ~/client_ws/install/string_subscriber_c/lib/string_subscriber_c/string_subscriber_c /usr/bin/ - -RUN ln -s ~/client_ws/install/complex_msg_publisher_c/lib/complex_msg_publisher_c/complex_msg_publisher_c /usr/bin/ -RUN ln -s ~/client_ws/install/subscriber_publisher_c/lib/subscriber_publisher_c/subscriber_publisher_c /usr/bin/ - - -# Add local setups -RUN echo . ~/client_ws/install/./local_setup.bash >> .bashrc diff --git a/Linux/precompiled_examples/Client_micro-ROS/README.md b/Linux/precompiled_examples/Client_micro-ROS/README.md deleted file mode 100644 index c4c30e8..0000000 --- a/Linux/precompiled_examples/Client_micro-ROS/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Client Quick Start - -This docker image has a ROS2/Micro-ROS workspace with a built Micro-ROS client-side demos ready to be run on a Linux system. The purpose of this image is to quickly run any Micro-ROS client-side demos. diff --git a/Linux/precompiled_examples/README.md b/Linux/precompiled_examples/README.md deleted file mode 100644 index 062c3c5..0000000 --- a/Linux/precompiled_examples/README.md +++ /dev/null @@ -1,18 +0,0 @@ -This folder contains Linux Ubuntu Docker files with precompiled examples. - -# micro-ROS Agent Quick Start - -Contains Docker files with ROS 2 workspace and buit-in micro-ROS Agent ready to run at a Linux system. - -# micro-ROS Client Quick Start - -Contains Docker files with ROS 2 workspace and buit-in micro-ROS Client ready to run at a Linux system. - - -# micro-XRCE Agent Quick Start - -Contains Docker files with micro-XRCE Agent example. - -# micro-XRCE Client Quick Start - -Contains Docker files with micro-XRCE Client example. From e465db601ed2f0d6c44226f2f27167911c1ee6f3 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 13:36:27 +0200 Subject: [PATCH 06/19] Use crystal branch. Refs #6397. --- base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/Dockerfile b/base/Dockerfile index b6673a4..1477aa6 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -4,6 +4,6 @@ RUN apt update && apt install -y curl RUN mkdir -p uros_ws/src WORKDIR uros_ws/src -RUN git clone --recursive --single-branch --branch feature/client_ws https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build +RUN git clone --recursive --single-branch --branch crystal https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build RUN . /opt/ros/crystal/setup.sh && colcon build --packages-select micro_ros_setup RUN . /opt/ros/crystal/setup.sh && rosdep update From ed246c4c3f2d2fe5b3c0053f5ac8e7fc67525e59 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 15:03:26 +0200 Subject: [PATCH 07/19] Use host client ws scripts.i Refs #6397. --- micro-ROS-demos/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/micro-ROS-demos/Dockerfile b/micro-ROS-demos/Dockerfile index cd9868f..b6d3b2b 100644 --- a/micro-ROS-demos/Dockerfile +++ b/micro-ROS-demos/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /uros_ws/src RUN apt update && apt install -y liblog4cxx-dev clang -RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_client_ws.sh +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_host_client_ws.sh RUN . /opt/ros/crystal/setup.sh && rosdep install -y --from-paths src -i src --skip-keys="microxrcedds_client microcdr rosidl_typesupport_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_opensplice_cpp rosidl_typesupport_opensplice_c rmw_connext_cpp rmw_opensplice_cpp" @@ -12,4 +12,4 @@ RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && colcon build --m # setup entrypoint COPY ./micro-ros_entrypoint.sh / -ENTRYPOINT ["/bin/sh", "/micro-ros_entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/sh", "/micro-ros_entrypoint.sh"] From c43379e94b7bb9ab9f9df594b51e056624a2ca39 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 15:17:32 +0200 Subject: [PATCH 08/19] Add firmware image and update Readme. Refs #6397. --- README.md | 37 +++++++++++++++-------------------- micro-ROS-firmware/Dockerfile | 6 ++++++ 2 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 micro-ROS-firmware/Dockerfile diff --git a/README.md b/README.md index 747a952..571bf35 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Avaiable images are listed below: | Image | Description | |-------|-------------| | Base | Base image with ROSDISTRO installation + micro-ROS specific build system. Used as base of any other micro-ROS image | -| micro-ROS-Agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | -| micro-ROS-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | -| micro-ROS-NuttX | Contains a firmware ws ready to configure and build micro-ROS | -| micro-ROS-NuttX-Olimex | Contains a ready to flash example for Olimex STM32 E407 | +| micro-ROS-Agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | +| micro-ROS-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | +| micro-ROS-firmware | Contains a firmware ws ready to configure and build micro-ROS | +| micro-ROS-Olimex-NuttX | Contains a ready to flash example for Olimex STM32 E407 | ## Pre-requisite @@ -23,24 +23,19 @@ For installing docker, refer to https://www.docker.com/. Images are automatically build in dockerhub, here you can find the current status of each image -**Base:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/linux.svg?logo=docker)](https://hub.docker.com/r/microros/linux/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/linux.svg?logo=docker)](https://hub.docker.com/r/microros/linux/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/linux.svg)](https://microbadger.com/images/microros/linux) +**Base:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/) +[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/) +[![Compare Images](https://images.microbadger.com/badges/image/microros/base.svg)](https://microbadger.com/images/microros/base) -**micro-ROS-Agent:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_linux.svg?logo=docker)](https://hub.docker.com/r/microros/client_linux/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/client_linux.svg?logo=docker)](https://hub.docker.com/r/microros/client_linux/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/client_linux.svg)](https://microbadger.com/images/microros/client_linux) +**micro-ROS-Agent:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/) +[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/) +[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-agent.svg)](https://microbadger.com/images/microros/micro-ros-agent) -**micro-ROS-demos:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/agent_linux.svg?logo=docker)](https://hub.docker.com/r/microros/agent_linux/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/agent_linux.svg?logo=docker)](https://hub.docker.com/r/microros/agent_linux/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/agent_linux.svg)](https://microbadger.com/images/microros/agent_linux) +**micro-ROS-demos:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/) +[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/) +[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-demos.svg)](https://microbadger.com/images/microros/micro-ros-demos) -## NuttX +**firmware:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/) +[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/) +[![Compare Images](https://images.microbadger.com/badges/image/microros/firmware.svg)](https://microbadger.com/images/microros/firmware) -**micro-ROS-firmware:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/stm32-e407/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/stm32-e407/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/stm32-e407.svg)](https://microbadger.com/images/microros/stm32-e407) - -**micro-ROS-NuttX-:nt stm32-e407:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/client_stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/client_stm32-e407/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/client_stm32-e407.svg?logo=docker)](https://hub.docker.com/r/microros/client_stm32-e407/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/client_stm32-e407.svg)](https://microbadger.com/images/microros/client_stm32-e407/) diff --git a/micro-ROS-firmware/Dockerfile b/micro-ROS-firmware/Dockerfile new file mode 100644 index 0000000..11413d3 --- /dev/null +++ b/micro-ROS-firmware/Dockerfile @@ -0,0 +1,6 @@ +FROM microros/base:crystal + +RUN apt install -y ed flex bison libncurses5-dev gcc-arm-none-eabi clang clang-tidy + +WORKDIR /uros_ws/src +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_firmware_ws.sh From 24c6f25db7ab7189b61b8103b1653e09cbdc2083 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 25 Sep 2019 15:33:25 +0200 Subject: [PATCH 09/19] Rename. Refs #6397. --- {micro-ROS-firmware => firmware}/Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {micro-ROS-firmware => firmware}/Dockerfile (100%) diff --git a/micro-ROS-firmware/Dockerfile b/firmware/Dockerfile similarity index 100% rename from micro-ROS-firmware/Dockerfile rename to firmware/Dockerfile From e965dbb741b9c6704ecf380223bbfc5895e95b52 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Fri, 27 Sep 2019 13:20:53 +0200 Subject: [PATCH 10/19] Use correct base tag. --- micro-ROS-demos/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/micro-ROS-demos/Dockerfile b/micro-ROS-demos/Dockerfile index b6d3b2b..0cf5879 100644 --- a/micro-ROS-demos/Dockerfile +++ b/micro-ROS-demos/Dockerfile @@ -1,4 +1,4 @@ -FROM microros/base:Crystal +FROM microros/base:crystal WORKDIR /uros_ws/src @@ -6,8 +6,6 @@ RUN apt update && apt install -y liblog4cxx-dev clang RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_host_client_ws.sh -RUN . /opt/ros/crystal/setup.sh && rosdep install -y --from-paths src -i src --skip-keys="microxrcedds_client microcdr rosidl_typesupport_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_opensplice_cpp rosidl_typesupport_opensplice_c rmw_connext_cpp rmw_opensplice_cpp" - RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && colcon build --metas src --cmake-args -DBUILD_SHARED_LIBS=ON # setup entrypoint From 8ee861941da45794e1f5c9e60663485bd076e21d Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Mon, 30 Sep 2019 08:37:23 +0200 Subject: [PATCH 11/19] Select correct RMW implementation. Refs #6397. --- micro-ROS-demos/micro-ros_entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/micro-ROS-demos/micro-ros_entrypoint.sh b/micro-ROS-demos/micro-ros_entrypoint.sh index ef98b7f..1aff64e 100755 --- a/micro-ROS-demos/micro-ros_entrypoint.sh +++ b/micro-ROS-demos/micro-ros_entrypoint.sh @@ -1,3 +1,4 @@ +export RMW_IMPLEMENTATION=rmw_microxrcedds . "/opt/ros/$ROS_DISTRO/setup.sh" . "/uros_ws/src/install/local_setup.sh" exec $@ From 5501fe09929b7b9a0d91c852dc48c94ae9952e02 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Tue, 1 Oct 2019 08:29:50 +0200 Subject: [PATCH 12/19] Add autobuild information. --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 571bf35..b48dae5 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,40 @@ Avaiable images are listed below: | micro-ROS-Agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | | micro-ROS-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | | micro-ROS-firmware | Contains a firmware ws ready to configure and build micro-ROS | -| micro-ROS-Olimex-NuttX | Contains a ready to flash example for Olimex STM32 E407 | +| micro-ROS-Olimex-NuttX | Contains a ready to flash example for Olimex STM32 E407 | + +Image hiearchy + +Base +|-- micro-ros-agent +|-- micro-ros-demos +|-- firmware + |-- micro-ROS-Olimex-NuttX + ## Pre-requisite You need to have docker in your system. For installing docker, refer to https://www.docker.com/. +## Automated builds + +These Docker files are used for automatically create images on Docker Hub. +These builds are tagged as the ROS 2 version they will be compatible with: eg. crystal, dashing... +The latest tag will be always the latest release of ROS 2. + +These automatic builds has direct relation with the conten of the micro-ROS repositories: + +| Image | Triggers | +|-------|----------| +| Base | micro-ROS/micro-ROS-build | +| Firmware | micro-ROS/apps micro-ROS/NuttX | +| micro-ROS-Agent | | +| micro-ROS-Olimex-NuttX | | + +Apart from gihub repositoriesi changes, a build is triggered whenever the base image is updated on Docker Hub. +Base images are specified in the FROM: directive in the Dockerfile. + ## Status Images are automatically build in dockerhub, here you can find the current status of each image From 9b2ca94af81bda00ba0434dc627281f2c7a42df1 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Tue, 1 Oct 2019 16:30:06 +0200 Subject: [PATCH 13/19] Update readmi with instructions and general information. --- README.md | 117 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index b48dae5..541a5cf 100644 --- a/README.md +++ b/README.md @@ -6,63 +6,96 @@ The docker images can be found in [dockerhub](https://hub.docker.com/u/microros) Avaiable images are listed below: -| Image | Description | -|-------|-------------| -| Base | Base image with ROSDISTRO installation + micro-ROS specific build system. Used as base of any other micro-ROS image | -| micro-ROS-Agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | -| micro-ROS-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | -| micro-ROS-firmware | Contains a firmware ws ready to configure and build micro-ROS | -| micro-ROS-Olimex-NuttX | Contains a ready to flash example for Olimex STM32 E407 | - -Image hiearchy - -Base -|-- micro-ros-agent -|-- micro-ros-demos -|-- firmware - |-- micro-ROS-Olimex-NuttX +| 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 build](https://img.shields.io/docker/cloud/automated/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/)[![Compare Images](https://images.microbadger.com/badges/image/microros/base.svg)](https://microbadger.com/images/microros/base) +| micro-ros-agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-agent.svg)](https://microbadger.com/images/microros/micro-ros-agent) +| micro-ros-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-demos.svg)](https://microbadger.com/images/microros/micro-ros-demos) +| micro-ros-firmware | Contains a firmware ws ready to configure and build micro-ROS | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/)[![Compare Images](https://images.microbadger.com/badges/image/microros/firmware.svg)](https://microbadger.com/images/microros/firmware) +| micro-ros-olimex-nuttX | Contains a ready to flash example for Olimex STM32 E407 |[![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-olimex-nuttx.svg)](https://microbadger.com/images/microros/micro-ros-olimex-nuttx) +![Imgea hierarchy](http://www.plantuml.com/plantuml/png/XOzFIoin5CNt-HHft-OzcCmyHn4K5yMs2r4iZAXBIPFRcT3y6MvksWf-UEqC0oCKkWd9oVcTU-uiaaHAphA9Xetnm1_cg-VNweatH6syBGgK-xmsrAHrYe0gU09FkGgkeDHAZPT5QwK_HWYZWXURu4d45Wr1B7PbVf7_PnFZbKqQ4jeXlr31kU3pzWSy-QzXLnOwg2rWRufRurk9qd44HTBN5kwbsjOOajVpO0FozyOGC4Q6B71d50PHhLvudyADapL4tXX0YQhvP6onV2i_5glvuxBwkvOHikweXlZiJtbrSxrS_Fjbt1XqUucG3PTpWAp1KpRj-s28eXEcvp0DBiGnrWbdiM2DWyEOwnNX4z7X9CwEQ_ExBo7uiDD8wjgEtbqDDXXxhH_1Pk1rSlOR) ## Pre-requisite You need to have docker in your system. For installing docker, refer to https://www.docker.com/. -## Automated builds +## Usage -These Docker files are used for automatically create images on Docker Hub. -These builds are tagged as the ROS 2 version they will be compatible with: eg. crystal, dashing... -The latest tag will be always the latest release of ROS 2. +To get a image you use `docker pull` command: -These automatic builds has direct relation with the conten of the micro-ROS repositories: +* eg: ```docker pull microros/base``` -| Image | Triggers | -|-------|----------| -| Base | micro-ROS/micro-ROS-build | -| Firmware | micro-ROS/apps micro-ROS/NuttX | -| micro-ROS-Agent | | -| micro-ROS-Olimex-NuttX | | +You can select the tag to use apending `:tag` to the image name -Apart from gihub repositoriesi changes, a build is triggered whenever the base image is updated on Docker Hub. -Base images are specified in the FROM: directive in the Dockerfile. +* eg: ```docker pull microros/base:crystal``` + +Once you have the image locally to start it use `docker run` + +* eg: ```docker run -it microros/micro-ros-agent``` + +`-it` allocates a pseudo-TTY for you and keeps sdin listening. +Another used command is `-v` to map local files with docker container ones. + +**base image** + +The base image is not intended to be run by the user. It is the base for the rest of the containers. +It contains the basic micro-ROS setup tools and dependencies. + +**firmware image** + +This image as the base one, it is used as starting point to those images using firmware. This image contains a firmware workspace setup and dependencies. + +**micro-ros-agent** + +This image purpose is to be run as a stand alone application. It includes an installation of the ROS 2 version selected byt 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. -## Status +* eg: `docker run -it --net=host microros/micro-ros-agent udp 9999` -Images are automatically build in dockerhub, here you can find the current status of each image +Will start micro-ROS-Agent listening UDP messages on port 9999 -**Base:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/base.svg?logo=docker)](https://hub.docker.com/r/microros/base/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/base.svg)](https://microbadger.com/images/microros/base) +**micro-ros-demos** -**micro-ROS-Agent:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-agent.svg)](https://microbadger.com/images/microros/micro-ros-agent) +This is one of the example images. Whith this image you can launch example applications usiong 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 -**micro-ROS-demos:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-demos.svg)](https://microbadger.com/images/microros/micro-ros-demos) +* eg: `docker run -it --net=hot microros/micro-ros-demos ros2` -**firmware:** [![Docker Automated build](https://img.shields.io/docker/automated/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/) -[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/) -[![Compare Images](https://images.microbadger.com/badges/image/microros/firmware.svg)](https://microbadger.com/images/microros/firmware) +The 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-demos-nuttx** + +This image provides you with a ready-to-flash firmware for Olimex-stm32-e407 with demos embedded on it. + + +## Automated builds + + +These Docker files are used for automatically create images on Docker Hub. +These builds are tagged as the ROS 2 version they will be compatible with: eg. crystal, dashing... + +The latest tag will be always 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 gihub repositoriesi changes, a build is triggered whenever the base image is updated on Docker Hub. +Base images are specified in the FROM: directive in the Dockerfile. From 0d0b7b2bbdbaf5b8e0ef28b825282b7cf4145ba3 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 07:33:41 +0200 Subject: [PATCH 14/19] Improve readability. --- README.md | 60 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 541a5cf..ec66c4b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Docker This repository contains docker-related material to setup, configure and develop with [micro-ROS](https://microros.github.io/) -These set of dockerfiles provide ready-to-use environments and applications. -The docker images can be found in [dockerhub](https://hub.docker.com/u/microros). +These set of Dockerfiles provide ready-to-use environments and applications. +The Docker images are available in [dockerhub](https://hub.docker.com/u/microros). Avaiable images are listed below: @@ -19,52 +19,58 @@ Avaiable images are listed below: ## Pre-requisite You need to have docker in your system. -For installing docker, refer to https://www.docker.com/. +For installing docker, refer to the official documentation at https://www.docker.com/. ## Usage -To get a image you use `docker pull` command: +To get an image, you use `docker pull` command: -* eg: ```docker pull microros/base``` +* e.g. ```docker pull microros/base``` -You can select the tag to use apending `:tag` to the image name +You can select the tag to use appending `:tag` to the image name -* eg: ```docker pull microros/base:crystal``` +* e.g. ```docker pull microros/base:crystal``` -Once you have the image locally to start it use `docker run` +Once you have the image locally, to start it use `docker run` -* eg: ```docker run -it microros/micro-ros-agent``` +* e.g. ```docker run -it microros/micro-ros-agent``` -`-it` allocates a pseudo-TTY for you and keeps sdin listening. +`-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** +#### base image -The base image is not intended to be run by the user. It is the base for the rest of the containers. -It contains the basic micro-ROS setup tools and dependencies. +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** +#### firmware image -This image as the base one, it is used as starting point to those images using firmware. This image contains a firmware workspace setup and dependencies. +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 is to be run as a stand alone application. It includes an installation of the ROS 2 version selected byt the tag along with a micro-ROS-Agent. +#### 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. -* eg: `docker run -it --net=host microros/micro-ros-agent udp 9999` +* 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 -This is one of the example images. Whith this image you can launch example applications usiong micro-ROS (Compiled for Linux boxes) +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 +You can run regular ros2 tool to launch the examples. * eg: `docker run -it --net=hot microros/micro-ros-demos ros2` -The avaiable examples are: +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 @@ -77,14 +83,11 @@ The avaiable examples are: This image provides you with a ready-to-flash firmware for Olimex-stm32-e407 with demos embedded on it. - ## Automated builds - These Docker files are used for automatically create images on Docker Hub. -These builds are tagged as the ROS 2 version they will be compatible with: eg. crystal, dashing... - -The latest tag will be always the latest release of ROS 2. +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: @@ -96,6 +99,5 @@ micro-ros-agent | micro-ros-demos | https://github.com/micro-ROS/micro-ROS-demos micro-ros-olimex-nuttx | -Apart from gihub repositoriesi changes, a build is triggered whenever the base image is updated on Docker Hub. +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. - From 590edd51ebbf3d9ec0236198d35e734a6e2a9f74 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 07:35:10 +0200 Subject: [PATCH 15/19] Fix case typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec66c4b..e558a2b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Avaiable images are listed below: | micro-ros-agent | Image containing a pre-compiled micro-ROS-Agent, ready to use as standalone application | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-agent.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-agent/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-agent.svg)](https://microbadger.com/images/microros/micro-ros-agent) | micro-ros-demos | Contains precompiled micro-ROS-demos, ready to use to view micro-ROS funcionality | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-demos.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-demos/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-demos.svg)](https://microbadger.com/images/microros/micro-ros-demos) | micro-ros-firmware | Contains a firmware ws ready to configure and build micro-ROS | [![Docker Automated build](https://img.shields.io/docker/cloud/automated/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/firmware.svg?logo=docker)](https://hub.docker.com/r/microros/firmware/)[![Compare Images](https://images.microbadger.com/badges/image/microros/firmware.svg)](https://microbadger.com/images/microros/firmware) -| micro-ros-olimex-nuttX | Contains a ready to flash example for Olimex STM32 E407 |[![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-olimex-nuttx.svg)](https://microbadger.com/images/microros/micro-ros-olimex-nuttx) +| micro-ros-olimex-nuttx | Contains a ready to flash example for Olimex STM32 E407 |[![Docker Automated build](https://img.shields.io/docker/automated/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Docker Build Status](https://img.shields.io/docker/cloud/build/microros/micro-ros-olimex-nuttx.svg?logo=docker)](https://hub.docker.com/r/microros/micro-ros-olimex-nuttx/)[![Compare Images](https://images.microbadger.com/badges/image/microros/micro-ros-olimex-nuttx.svg)](https://microbadger.com/images/microros/micro-ros-olimex-nuttx) ![Imgea hierarchy](http://www.plantuml.com/plantuml/png/XOzFIoin5CNt-HHft-OzcCmyHn4K5yMs2r4iZAXBIPFRcT3y6MvksWf-UEqC0oCKkWd9oVcTU-uiaaHAphA9Xetnm1_cg-VNweatH6syBGgK-xmsrAHrYe0gU09FkGgkeDHAZPT5QwK_HWYZWXURu4d45Wr1B7PbVf7_PnFZbKqQ4jeXlr31kU3pzWSy-QzXLnOwg2rWRufRurk9qd44HTBN5kwbsjOOajVpO0FozyOGC4Q6B71d50PHhLvudyADapL4tXX0YQhvP6onV2i_5glvuxBwkvOHikweXlZiJtbrSxrS_Fjbt1XqUucG3PTpWAp1KpRj-s28eXEcvp0DBiGnrWbdiM2DWyEOwnNX4z7X9CwEQ_ExBo7uiDD8wjgEtbqDDXXxhH_1Pk1rSlOR) From 443ca1d88f50ff27b693a793e19b86ab7f4e704c Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 14:40:20 +0200 Subject: [PATCH 16/19] Add usbutils for flash script. --- firmware/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/Dockerfile b/firmware/Dockerfile index 11413d3..8a9a855 100644 --- a/firmware/Dockerfile +++ b/firmware/Dockerfile @@ -1,6 +1,6 @@ FROM microros/base:crystal -RUN apt install -y ed flex bison libncurses5-dev gcc-arm-none-eabi clang clang-tidy +RUN apt install -y ed flex bison libncurses5-dev gcc-arm-none-eabi clang clang-tidy usbutils WORKDIR /uros_ws/src RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_firmware_ws.sh From 798af6f043cdaae71036b6e6689b31c1fbe19e30 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 14:56:46 +0200 Subject: [PATCH 17/19] Remove duplicated and no needed Docker files. --- Embedded/NuttX/development/README.md | 3 - .../NuttX/development/stm32-e407/Dockerfile | 53 ------------- .../NuttX/development/stm32-e407/README.md | 35 --------- .../development/stm32l1discovery/Dockerfile | 52 ------------- .../development/stm32l1discovery/README.md | 40 ---------- .../NuttX/precompiled/micro-ROS/README.md | 4 - .../micro-ROS/olimex_stm32-e407/Dockerfile | 77 ------------------- .../micro-ROS/olimex_stm32-e407/README.md | 65 ---------------- 8 files changed, 329 deletions(-) delete mode 100644 Embedded/NuttX/development/README.md delete mode 100644 Embedded/NuttX/development/stm32-e407/Dockerfile delete mode 100644 Embedded/NuttX/development/stm32-e407/README.md delete mode 100644 Embedded/NuttX/development/stm32l1discovery/Dockerfile delete mode 100644 Embedded/NuttX/development/stm32l1discovery/README.md delete mode 100644 Embedded/NuttX/precompiled/micro-ROS/README.md delete mode 100644 Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile delete mode 100644 Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/README.md diff --git a/Embedded/NuttX/development/README.md b/Embedded/NuttX/development/README.md deleted file mode 100644 index 0bc29e0..0000000 --- a/Embedded/NuttX/development/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# NuttX - - NuttX Docker files for testing and running NuttX RTOS in Olimex STM32-E407 and STM32LDiscover development boards. diff --git a/Embedded/NuttX/development/stm32-e407/Dockerfile b/Embedded/NuttX/development/stm32-e407/Dockerfile deleted file mode 100644 index f7775c6..0000000 --- a/Embedded/NuttX/development/stm32-e407/Dockerfile +++ /dev/null @@ -1,53 +0,0 @@ -FROM microros/linux:latest - -RUN apt update - -# Install essential required for Nuttx complilation -RUN apt install -y bison \ - flex \ - gperf \ - libgmp-dev \ - libmpc-dev \ - libmpfr-dev \ - libisl-dev \ - binutils-dev \ - libelf-dev \ - libexpat1-dev \ - zlib1g-dev \ - libncurses5-dev \ - gettext \ - texinfo \ - gcc-arm-none-eabi \ - gdb-multiarch \ - openocd \ - libusb-1.0-0-dev \ - automake \ - autotools-dev - - - -# Install utils and tools. -RUN apt install -y remake \ - vim \ - screen \ - ranger \ - minicom - - -# Clone nuttx repo -RUN git clone https://github.com/microROS/NuttX - - -# Clone nuttx apps repo. -RUN git clone https://github.com/microROS/apps.git ~/apps - - -# Clone, Build and install kconfig-frontends repo -RUN git clone https://bitbucket.org/nuttx/tools.git ~/tools -RUN (cd tools/kconfig-frontends && \ - ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf && \ - LD_RUN_PATH=/usr/local/lib && make && make install && ldconfig) - -RUN cd NuttX && \ - tools/configure.sh ../configs/olimex-stm32-e407/nsh && \ - make diff --git a/Embedded/NuttX/development/stm32-e407/README.md b/Embedded/NuttX/development/stm32-e407/README.md deleted file mode 100644 index f284e64..0000000 --- a/Embedded/NuttX/development/stm32-e407/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Environment for micro-ROS STM32F4 platform (as a Docker container) - -- Target board: OLIMEX STM32-E407 -- Target microcontroller: STM32F4 - -Build the container and compile a simple `nsh` aplication for the `OLIMEX STM32-E407` board: -```bash -docker build -t microros_stm32f4 . -``` -Access the container with privileges so that we can flash the board from within: -```bash -docker run -it -v /dev/bus/usb:/dev/bus/usb --privileged microros_stm32f4 /bin/bash -``` -Flash the board: -```bash -# inside the docker container -cd nuttx -openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000" -``` -if successful, you should see something like this: -```bash -... -Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0) -Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints -Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4) -Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0) -target state: halted -target halted due to debug-request, current mode: Thread -xPSR: 0x01000000 pc: 0x080004b4 msp: 0x20000de4 -auto erase enabled -Info : device id = 0x10076413 -Info : flash size = 1024kbytes -wrote 65536 bytes from file nuttx.bin in 2.157869s (29.659 KiB/s) - -``` diff --git a/Embedded/NuttX/development/stm32l1discovery/Dockerfile b/Embedded/NuttX/development/stm32l1discovery/Dockerfile deleted file mode 100644 index c29e055..0000000 --- a/Embedded/NuttX/development/stm32l1discovery/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM microros/linux:latest - - -# Install essential required for Nuttx complilation -RUN apt install -y bison \ - flex \ - gperf \ - libgmp-dev \ - libmpc-dev \ - libmpfr-dev \ - libisl-dev \ - binutils-dev \ - libelf-dev \ - libexpat1-dev \ - zlib1g-dev \ - libncurses5-dev \ - gettext \ - texinfo \ - gcc-arm-none-eabi \ - gdb-multiarch \ - openocd \ - libusb-1.0-0-dev \ - automake \ - autotools-dev - - - -# Install utils and tools. -RUN apt install -y remake \ - vim \ - screen \ - ranger \ - minicom - - -# Clone nuttx repo -RUN git clone https://github.com/microROS/NuttX - - -# Clone nuttx apps repo. -RUN git clone https://github.com/microROS/apps.git ~/apps - - -# Clone, Build and install kconfig-frontends repo -RUN git clone https://bitbucket.org/nuttx/tools.git ~/tools -RUN (cd tools/kconfig-frontends && \ - ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf && \ - LD_RUN_PATH=/usr/local/lib && make && make install && ldconfig) - -RUN cd NuttX && \ - tools/configure.sh ../configs/stm32ldiscovery/nsh && \ - make diff --git a/Embedded/NuttX/development/stm32l1discovery/README.md b/Embedded/NuttX/development/stm32l1discovery/README.md deleted file mode 100644 index c75984b..0000000 --- a/Embedded/NuttX/development/stm32l1discovery/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Environment for micro-ROS STM32F4 platform (as a Docker container) - -- Target board: STM32L1Discovery Board -- Target microcontroller: STM32L152RCT6 - -Build the container and compile a simple `nsh` aplication for the `STM32L1Discovery` board: -```bash -docker build -t microros_stm32l1 . -``` -Access the container with privileges so that we can flash the board from within: -```bash -docker run -it -v /dev/bus/usb:/dev/bus/usb --privileged microros_stm32l1 /bin/bash -``` -Flash the board: -```bash -# inside the docker container -cd nuttx -./scripts/flash.sh stm32l1 -``` -if successful, you should see something like this: -```bash -auto erase enabled -Info : Device: STM32L1xx (Cat.3 - Medium+ Density) -Info : STM32L flash size is 256kb, base address is 0x8000000 -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -target halted due to breakpoint, current mode: Thread -xPSR: 0x61000000 pc: 0x20000012 msp: 0x2000169c -wrote 49152 bytes from file nuttx.bin in 6.370747s (7.534 KiB/s) - - -``` diff --git a/Embedded/NuttX/precompiled/micro-ROS/README.md b/Embedded/NuttX/precompiled/micro-ROS/README.md deleted file mode 100644 index eb54c42..0000000 --- a/Embedded/NuttX/precompiled/micro-ROS/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# micro-ROS - - Docker files for micro-ROS client implementation running at NuttX RTOS. - Targets: Olimex STM32-E407 and STM32LDiscover development boards. diff --git a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile b/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile deleted file mode 100644 index b5a8f23..0000000 --- a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -FROM microros/linux:latest -# Install essential required for Nuttx complilation -RUN apt install -y bison \ - flex \ - gperf \ - libgmp-dev \ - libmpc-dev \ - libmpfr-dev \ - libisl-dev \ - binutils-dev \ - libelf-dev \ - libexpat1-dev \ - zlib1g-dev \ - libncurses5-dev \ - gettext \ - texinfo \ - gcc-arm-none-eabi \ - gdb-multiarch \ - openocd \ - libusb-1.0-0-dev \ - automake \ - autotools-dev - - - -# Install utils and tools. -RUN apt install -y remake \ - vim \ - screen \ - ranger \ - minicom - - -# Clone nuttx repo -RUN git clone https://github.com/micro-ROS/NuttX.git ~/nuttx -RUN cd ~/nuttx && git checkout tags/v0.0.2-alpha - - -# Clone nuttx apps repo. -RUN git clone https://github.com/micro-ROS/apps.git ~/apps -RUN cd ~/apps && git checkout tags/v0.0.3-alpha - - -# Clone, Build and install kconfig-frontends repo -RUN git clone https://bitbucket.org/nuttx/tools.git ~/tools -RUN (cd tools/kconfig-frontends && \ - ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf && \ - LD_RUN_PATH=/usr/local/lib && make && make install && ldconfig) - - - -# Clone and install uclibc -RUN git clone https://bitbucket.org/nuttx/uclibc.git ~/uclibc -RUN (cd ~/uclibc/ && echo -e "Y\nY\nY\nY\n" | ./install.sh ~/nuttx) - - -#-------- - - -# Download, build and install `Micro-ROS build system` -RUN mkdir -p ~/uros_build_ws/src -RUN wget https://raw.githubusercontent.com/microROS/micro-ROS-doc/master/repos/mcu/uros_build.repos -O ~/uros_build_ws/uros_build.repos -RUN vcs import ~/uros_build_ws/src < ~/uros_build_ws/uros_build.repos -RUN (cd ~/uros_build_ws && colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF) - - -# Download `Micro-ROS` -RUN mkdir -p ~/uros_ws/src -RUN wget https://raw.githubusercontent.com/microROS/micro-ROS-doc/master/repos/mcu/uros_mcu.repos -O ~/uros_ws/uros_mcu.repos -RUN vcs import ~/uros_ws/src < ~/uros_ws/uros_mcu.repos -RUN touch ~/uros_ws/src/uros/micro-ROS-demo/COLCON_IGNORE -RUN sed -i s/"CONFIG_MICRO_XRCEDDS_TRANSPORT=.*"/"CONFIG_MICRO_XRCEDDS_TRANSPORT=serial"/g ~/uros_ws/src/uros/rmw-microxrcedds/rmw_microxrcedds_c/rmw_microxrcedds.config - - -# Build Nuttx binary -RUN (cd ~/nuttx && tools/configure.sh ./configs/olimex-stm32-e407/uros/) - RUN (. ~/uros_build_ws/install/local_setup.sh && cd ~/nuttx && make) diff --git a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/README.md b/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/README.md deleted file mode 100644 index 0726de8..0000000 --- a/Embedded/NuttX/precompiled/micro-ROS/olimex_stm32-e407/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Environment for micro-ROS STM32F4 platform (as a Docker container) - -- Target board: OLIMEX STM32-E407 -- Target microcontroller: STM32F4 - -This image contains all the dependencies to compile and run micro-ROS in an Olimex STM32-E407: - -- NuttX environment. -- CrossCompile tools. -- Micro-ROS environment. - -Along with all the dependencies, this image contains micro-ROS publish/subscribe pre-built examples ready to flash and run on the board. - -## Build - -There are two options to get the image. - -1. Build your own the image using the docker file: - - ```bash - docker build -t microros_stm32f4 . - ``` - -1. Pull the image from DockerHub. - ```bash - docker pull microros_stm32f4 - ``` - -## Run - -Access the container with privileges so that we can flash the board from within: - -```bash -docker run -it -v /dev/bus/usb:/dev/bus/usb --privileged microros_stm32f4 /bin/bash -``` - - Flash the board: - -```bash -# inside the docker container -cd nuttx -openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000" -``` - -if successful, you should see something like this: - -```bash -. -. -. -Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0) -Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints -Info : JTAG tap: stm32f4x.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4) -Info : JTAG tap: stm32f4x.bs tap/device found: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0) -target state: halted -target halted due to debug-request, current mode: Thread -xPSR: 0x01000000 pc: 0x080004b4 msp: 0x20000de4 -auto erase enabled -Info : device id = 0x10076413 -Info : flash size = 1024kbytes -wrote 65536 bytes from file nuttx.bin in 2.157869s (29.659 KiB/s) - -``` - -At this point, you should have your board flashed with NuttX image containing an `nsh` application and a publisher and a subscriber using micro-ROS. From c954e5a41e6a46bee075ce90c5a2a95501b123cb Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 15:22:02 +0200 Subject: [PATCH 18/19] Add micro-ROS-Olimex-NuttX image. --- README.md | 11 ++++++++++- micro-ROS-Olimex-NuttX/Dockerfile | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 micro-ROS-Olimex-NuttX/Dockerfile diff --git a/README.md b/README.md index e558a2b..999f6b7 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,18 @@ The currently avaiable examples are: * string_subscriber_c & string_subscriber_cpp * rad0_actuator_c, rad0_altitude_sensor_c, rad0_control_cpp & rad0_display_c -**micro-ros-demos-nuttx** +### 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 diff --git a/micro-ROS-Olimex-NuttX/Dockerfile b/micro-ROS-Olimex-NuttX/Dockerfile new file mode 100644 index 0000000..f9e5bd5 --- /dev/null +++ b/micro-ROS-Olimex-NuttX/Dockerfile @@ -0,0 +1,18 @@ +FROM microros/firmware:crystal + +WORKDIR /uros_ws/src + +RUN apt install -y gperf openocd + +RUN git clone https://bitbucket.org/nuttx/tools.git ~/tools +RUN (cd ~/tools/kconfig-frontends && \ + ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf && \ + LD_RUN_PATH=/usr/local/lib && make && make install && ldconfig) + +RUN cd firmware/NuttX && \ + tools/configure.sh configs/olimex-stm32-e407/uros && \ + cd ../.. + +RUN find ./firmware/mcu_ws/ -name rmw_microxrcedds.config -exec sed -i "s/CONFIG_MICRO_XRCEDDS_TRANSPORT=udp/CONFIG_MICRO_XRCEDDS_TRANSPORT=serial/g" {} \; + +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup build_firmware.sh From a9058af38e68d3312513436d977c089ef6826334 Mon Sep 17 00:00:00 2001 From: Borja Outerelo Date: Wed, 2 Oct 2019 15:23:28 +0200 Subject: [PATCH 19/19] Use same title. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 999f6b7..1f09871 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ The currently avaiable examples are: * string_subscriber_c & string_subscriber_cpp * rad0_actuator_c, rad0_altitude_sensor_c, rad0_control_cpp & rad0_display_c -### micro-ros-olimex-nuttx +#### 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