• Stars
    star
    365
  • Rank 116,837 (Top 3 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Support macros for building micro-ROS-based firmware.


This ROS 2 package is the entry point for building micro-ROS apps for different embedded platforms.

Supported platforms

This package provides tools and utils to crosscompile micro-ROS with just the common ROS 2 tools for the following platforms platforms.

Note that this package provides basic support only, intended in particular for ROS developers who are new to microcontrollers. Micro-ROS components for each platform are available and provide a deeper and more flexible integration with the platform-specific build systems.

RTOS Platform Version Example Recommended Alternative
Azure RTOS / FreeRTOS / Bare metal Renesas RA6M5 Renesas e2 studio renesas_ra ra6m5 micro-ROS component for Renesas e2 studio and RA6M5
FreeRTOS ST Nucleo F446RE 1 STM32CubeMX latest freertos nucleo_f446re micro-ROS utils for STM32CubeMX and STM32CubeIDE
FreeRTOS ST Nucleo F446ZE 1 STM32CubeMX latest freertos nucleo_f446ze micro-ROS utils for STM32CubeMX and STM32CubeIDE
FreeRTOS ST Nucleo F746ZG 1 STM32CubeMX latest freertos nucleo_f746zg micro-ROS utils for STM32CubeMX and STM32CubeIDE
FreeRTOS ST Nucleo F767ZI 1 STM32CubeMX latest freertos nucleo_f767zi micro-ROS utils for STM32CubeMX and STM32CubeIDE
FreeRTOS Espressif ESP32 v8.2.0 freertos esp32 micro-ROS component for ESP-IDF
FreeRTOS Crazyflie 2.1 v10.2.1 - CF 2020.06 freertos crazyflie21
Zephyr Olimex STM32-E407 v2.6.0 zephyr olimex-stm32-e407 micro-ROS module for Zephyr RTOS
Zephyr ST Nucleo F446RE 1 v2.6.0 zephyr nucleo_f446re micro-ROS module for Zephyr RTOS
Zephyr ST B-L475E-IOT01A v2.6.0 zephyr discovery_l475_iot1 micro-ROS module for Zephyr RTOS
Zephyr ST Nucleo H743ZI 1 v2.6.0 zephyr nucleo_h743zi micro-ROS module for Zephyr RTOS
Zephyr Zephyr emulator v2.6.0 zephyr host micro-ROS module for Zephyr RTOS
Mbed ST B-L475E-IOT01A v6.6 mbed disco_l475vg_iot01a micro-ROS module for Mbed RTOS
- Static library (.a) and headers (.h) 3 - generate_lib
Linux Host 2 Ubuntu 18.04/20.04 host
Android AOSP 1 Latest android generic

1 Community supported, may have lack of official support

2 Support for compiling apps in a native Linux host for testing and debugging

3 a valid CMake toolchain with custom crosscompilation definition is required

Standalone build system tools

micro_ros_setup provides access to standalone build system tools using the component command. After building this package just run:

ros2 run micro_ros_setup component --help

micro-ROS standalone module for specific platforms are:

Dependencies

This package targets the ROS 2 installation. ROS 2 supported distributions are:

ROS 2 Distro State Branch
Crystal EOL crystal
Dashing EOL dashing
Foxy EOL foxy
Galactic EOL galactic
Humble Supported humble
Iron Supported iron
Rolling Supported main

Some other prerequisites needed for building a firmware using this package are:

sudo apt install python3-rosdep

Building for Android needs Latest Android NDK to be installed and the following environment variables to be set:

  • ANDROID_ABI: CPU variant, refer here for details.
  • ANDROID_NATIVE_API_LEVEL: Android platform version, refer here for details.
  • ANDROID_NDK: root path of the installed NDK.

Quick start

Download here the micro-ROS docker image that contains a pre-installed client and agent as well as some compiled examples.

Building

Create a ROS 2 workspace and build this package for a given ROS 2 distro (see table above):

source /opt/ros/$ROS_DISTRO/setup.bash

mkdir uros_ws && cd uros_ws

git clone -b main https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup

rosdep update && rosdep install --from-paths src --ignore-src -y

colcon build

source install/local_setup.bash

Once the package is built, the firmware scripts are ready to run.

You can find tutorials for moving your first steps with micro-ROS on an RTOS in the micro-ROS webpage.

Creating micro-ROS firmware

Using the create_firmware_ws.sh [RTOS] [Platform] command, a firmware folder will be created with the required code for building a micro-ROS app. For example, for our reference platform, the invocation is:

# Creating a FreeRTOS + micro-ROS firmware workspace
ros2 run micro_ros_setup create_firmware_ws.sh freertos olimex-stm32-e407

# Creating a Zephyr + micro-ROS firmware workspace
ros2 run micro_ros_setup create_firmware_ws.sh zephyr olimex-stm32-e407

Configuring micro-ROS firmware

By running configure_firmware.sh command the installed firmware is configured and modified in a pre-build step. This command will show its usage if parameters are not provided:

ros2 run micro_ros_setup configure_firmware.sh [configuration] [options]

By running this command without any argument the available demo applications and configurations will be shown.

Common options available at this configuration step are:

  • --transport or -t: udp, serial or any hardware specific transport label
  • --dev or -d: agent string descriptor in a serial-like transport (optional)
  • --ip or -i: agent IP in a network-like transport (optional)
  • --port or -p: agent port in a network-like transport (optional)

Please note that each RTOS has its configuration approach that you might use for further customization of these base configurations. Visit the micro-ROS webpage for detailed information about RTOS configuration.

In summary, the supported configurations for transports are:

FreeRTOS Zephyr Mbed
Olimex STM32-E407 UART, Network USB, UART -
ST B-L475E-IOT01A - USB, UART, Network UART
Crazyflie 2.1 Custom Radio Link - -
Espressif ESP32 UART, WiFI UDP - -
ST Nucleo F446RE 1 UART UART -
ST Nucleo F446ZE 1 UART - -
ST Nucleo H743ZI 1 - UART -
ST Nucleo F746ZG 1 UART UART -
ST Nucleo F767ZI 1 UART - -

1 Community supported, may have lack of official support

Building micro-ROS firmware

By running build_firmware.sh the firmware is built:

ros2 run micro_ros_setup build_firmware.sh

Flashing micro-ROS firmware

In order to flash the target platform run flash_firmware.sh command. This step may need some platform-specific procedure to boot the platform in flashing mode:

ros2 run micro_ros_setup flash_firmware.sh

Building micro-ROS-Agent

Using this package is possible to install a ready to use micro-ROS-Agent:

ros2 run micro_ros_setup create_agent_ws.sh
ros2 run micro_ros_setup build_agent.sh
source install/local_setup.sh
ros2 run micro_ros_agent micro_ros_agent [parameters]

Contributing

As it is explained along this document, the firmware building system takes four steps: creating, configuring, building and flashing.

New combinations of platforms and RTOS are intended to be included in config folder. For example, the scripts for building a micro-ROS app for Crazyflie 2.1 using FreeRTOS is located in config/freertos/crazyflie21.

This folder contains up to four scripts:

  • create.sh: gets a variable named $FW_TARGETDIR and installs in this path all the dependencies and code required for the firmware.
  • configure.sh: modifies and configure parameters of the installed dependencies. This step is optional.
  • build.sh: builds the firmware and create a platform-specific linked binary.
  • flash.sh: flashes the binary in the target platform.

Some other required files inside the folder can be accessed from these scripts using the following paths:

# Files inside platform folder
$PREFIX/config/$RTOS/$PLATFORM/

# Files inside config folder
$PREFIX/config

Purpose of the Project

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

License

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

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

Known Issues / Limitations

There are no known limitations.

If you find issues, please report them.

Papers

If you want to cite micro-ROS, please cite the following book chapter (PDF available at Springer Link):

Kaiwalya Belsare, Antonio Cuadros Rodriguez, Pablo Garrido Sánchez, Juanjo Hierro, Tomasz Kołcon, Ralph Lange, Ingo Lütkebohle, Alexandre Malki, Jaime Martin Losa, Francisco Melendez, Maria Merlan Rodriguez, Arne Nordmann, Jan Staschulat, and Julian von Mendel: Micro-ROS. In: Anis Koubaa (ed.) Robot Operating System (ROS): The Complete Reference (Volume 7), Springer, pp. 3–55, 2023. (Online since 2 February 2023.)

@INBOOK{Belsare_et_al_2023_Micro-ROS,
  author = {Kaiwalya Belsare and Antonio Cuadros Rodriguez and Pablo Garrido S\'{a}nchez and Juanjo Hierro
            and Tomasz Ko\l{}con and Ralph Lange and Ingo L\"{u}tkebohle and Alexandre Malki
            and Jaime Martin Losa and Francisco Melendez and Maria Merlan Rodriguez and Arne Nordmann
            and Jan Staschulat and and Julian von Mendel},
  title = {Micro-ROS},
  editor = {Anis Koubaa},
  booktitle = {Robot Operating System (ROS): The Complete Reference (Volume 7)},
  year = {2023},
  publisher = {Springer},
  pages = {3--55},
  doi = {10.1007/978-3-031-09062-2_2}
}

More Repositories

1

micro_ros_arduino

micro-ROS library for Arduino
C
437
star
2

micro_ros_espidf_component

micro-ROS ESP32 IDF component and sample code
C
254
star
3

micro_ros_platformio

micro-ROS library for Platform.IO
Python
209
star
4

micro_ros_stm32cubemx_utils

A set of utilities for integrating micro-ROS in a STM32CubeMX project
C
163
star
5

micro-ROS.github.io

A platform for seamless integration of resource constrained devices in the ROS ecosystem.
SCSS
110
star
6

micro-ROS-Agent

ROS 2 package using Micro XRCE-DDS Agent.
C++
101
star
7

NuttX

Official micro-ROS RTOS
C
88
star
8

micro-ROS-demos

Sample code using rclc and rclcpp implementations.
C
84
star
9

freertos_apps

Sample applications for FreeRTOS + micro-ROS
C
81
star
10

micro_ros_zephyr_module

micro-ROS Zephyr module and sample code
C
54
star
11

docker

Docker-related material to setup, configure and develop with micro-ROS hardware.
Dockerfile
49
star
12

system_modes

System modes for ROS 2 and micro-ROS
C++
43
star
13

rmw_microxrcedds

RMW implementation using Micro XRCE-DDS middleware.
C
35
star
14

micro-ROS_moveit2_demo

Provides a demo of micro-ROS and MoveIt2 based on ST Disco L475 IOT01 board IMU sensors.
C++
22
star
15

zephyr_apps

Sample applications for Zephyr + micro-ROS
C
19
star
16

micro_ros_mbed

micro-ROS mbed sample code
Makefile
18
star
17

micro-ROS_crazyflie_demo

Provides a demo of micro-ROS based on a Crazyflie.
Python
18
star
18

micro-ROS_openmanipulator_demo

Provides a demo of micro-ROS based on ROBOTIS OpenManipulator, Olimex STM32 E407 and VL53L1X ToF sensor.
C++
14
star
19

micro-ROS_kobuki_demo

Provides a demo of micro-ROS based on a Kobuki and an Olimex STM32-E407 board.
Python
14
star
20

rmw_embeddedrtps

RMW implementation for EmbeddedRTPS middleware
C++
13
star
21

micro-ROS_sensors_demo

Provides a demo of micro-ROS based on ST Disco L475 IOT01 board.
Shell
12
star
22

micro_ros_nuttx_app

An standalone micro-ROS app for Nuttx
Makefile
11
star
23

nuttx_apps

C
10
star
24

micro_ros_azure_rtos_app

micro-ROS app for Azure RTOS
C
8
star
25

micro_ros_utilities

General utilities for easing the usage of micro-ROS on different platforms
C
8
star
26

micro_ros_diagnostics

Diagnostics framework for micro-ROS
C
8
star
27

micro-ROS-bridge_RPI

Shell
7
star
28

micro_ros_rtthread_component

Python
7
star
29

micro_ros_msgs

Collection of ROS 2 message definitions used throughout the implementation of micro-ROS, both in the agent and client endpoints.
CMake
6
star
30

micro_ros_renesas2estudio_component

A set of utilities for integrating micro-ROS in a Renesas e2 studio project
C
6
star
31

micro-ROS_warehouse_demo

Python
5
star
32

rosidl_typesupport_microxrcedds

Type support for Micro XRCE-DDS
EmberScript
4
star
33

micro_ros_renesas_testbench

micro-ROS hardware in the loop testing
C
4
star
34

micro_ros_tivac_launchpad_app

micro-ROS app for TI Tiva C Series TM4C123GXL LaunchPad
C
4
star
35

micro_ros_vitis_component

Shell
4
star
36

micro_ros_renesas_demos

Demo code for Renesas e2 studio
C
4
star
37

benchmarking

A sets a tools and framework to develop embedded system benchmarks
C
4
star
38

benchmarking_shadow-builder

Repositiory containing the shadow-builder benchmarking tool
C++
3
star
39

executor_testbench

Executor modul for rcl with customizable scheduling semantics
C
2
star
40

raspbian_apps

C
2
star
41

micro-ROS_thumper_demo

A 6 wheel mobile robot contraller over 6LoWPAN and micro-ROS
Shell
2
star
42

micro-ROS-rtt

Micro-ROS Round-Trip Tests
C++
1
star
43

benchmarking-results

Benchmarking results
HTML
1
star
44

micro-ROS_demobox_demo

The demo box is a portable suitcase demonstration, showing advantage of using micro-ROS over ROS2 by showing power measurement and bootup time.
Shell
1
star
45

.github

micro-ROS GitHub Organization-wide files
1
star