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 823f464..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. 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. diff --git a/README.md b/README.md index 9d0e0fd..1f09871 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,112 @@ # 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 are available 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: -For installing docker, refer to https://www.docker.com/. +| 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) -## Linux +![Imgea hierarchy](http://www.plantuml.com/plantuml/png/XOzFIoin5CNt-HHft-OzcCmyHn4K5yMs2r4iZAXBIPFRcT3y6MvksWf-UEqC0oCKkWd9oVcTU-uiaaHAphA9Xetnm1_cg-VNweatH6syBGgK-xmsrAHrYe0gU09FkGgkeDHAZPT5QwK_HWYZWXURu4d45Wr1B7PbVf7_PnFZbKqQ4jeXlr31kU3pzWSy-QzXLnOwg2rWRufRurk9qd44HTBN5kwbsjOOajVpO0FozyOGC4Q6B71d50PHhLvudyADapL4tXX0YQhvP6onV2i_5glvuxBwkvOHikweXlZiJtbrSxrS_Fjbt1XqUucG3PTpWAp1KpRj-s28eXEcvp0DBiGnrWbdiM2DWyEOwnNX4z7X9CwEQ_ExBo7uiDD8wjgEtbqDDXXxhH_1Pk1rSlOR) -**Development:** [![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) +## Pre-requisite -**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/) -[![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) +You need to have docker in your system. +For installing docker, refer to the official documentation at https://www.docker.com/. -**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/) -[![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) +## Usage -## NuttX +To get an image, you use `docker pull` command: -**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/) -[![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) +* e.g. ```docker pull microros/base``` -**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/) -[![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/) +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. 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 diff --git a/firmware/Dockerfile b/firmware/Dockerfile new file mode 100644 index 0000000..8a9a855 --- /dev/null +++ b/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 usbutils + +WORKDIR /uros_ws/src +RUN . /opt/ros/crystal/setup.sh && . install/local_setup.sh && ros2 run micro_ros_setup create_firmware_ws.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 $@ 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 diff --git a/micro-ROS-demos/Dockerfile b/micro-ROS-demos/Dockerfile new file mode 100644 index 0000000..0cf5879 --- /dev/null +++ b/micro-ROS-demos/Dockerfile @@ -0,0 +1,13 @@ +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_host_client_ws.sh + +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"] diff --git a/micro-ROS-demos/micro-ros_entrypoint.sh b/micro-ROS-demos/micro-ros_entrypoint.sh new file mode 100755 index 0000000..1aff64e --- /dev/null +++ b/micro-ROS-demos/micro-ros_entrypoint.sh @@ -0,0 +1,4 @@ +export RMW_IMPLEMENTATION=rmw_microxrcedds +. "/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