Skip to content

Commit cbad333

Browse files
FranFinpablogs9
andauthored
Added blogpost on esp32 port. (#210)
* Added blogpost on esp32 port. * Added ESP32 to overview/supported_hardware. * Added ESP32 peripherals * Deleted an outdated NuttX-specific sentence. * Deleted ESP32 post Testing CI * Revert "Deleted ESP32 post" This reverts commit b072c84. * FIx CI This fix allow to do changes both in docs and blog on the same PR * Update CI Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
1 parent 0f13ffe commit cbad333

6 files changed

Lines changed: 64 additions & 7 deletions

File tree

‎_docs/overview/hardware/imgs/4.jpg‎

73.9 KB
Loading

‎_docs/overview/hardware/index.md‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ title: Supported Hardware
33
permalink: /docs/overview/hardware/
44
---
55

6-
micro-ROS targets mid-range and high-performance 32-bits microcontrollers families. For now, most of the ports are based on the [STM32 series](https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html) from ST. These kinds of MCU feature ARM Cortex-M processors with many peripherals such as GPIO, communication or coprocessors. By default, micro-ROS uses [NuttX RTOS](https://nuttx.org/), but it also has ports for [FreeRTOS](https://www.freertos.org/) and [Zephyr](https://www.zephyrproject.org/). These RTOSes have a big variety of supported MCUs and development boards. The following list shows some of them:
6+
micro-ROS targets mid-range and high-performance 32-bits microcontrollers families.
7+
For the moment, all official ports are based on the [STM32 series](https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html) from [ST](https://www.st.com/content/st_com/en.html) and on the [ESP32](https://www.espressif.com/en/products/socs/esp32) from [Espressif](https://www.espressif.com/en).
8+
The former feature ARM Cortex-M processors with many peripherals such as GPIO, communication or coprocessors, and the second are highly-integrated chips with in-built antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules.
9+
10+
By default, micro-ROS uses [NuttX RTOS](https://nuttx.org/), but it also has ports for [FreeRTOS](https://www.freertos.org/) and [Zephyr](https://www.zephyrproject.org/). These RTOSes have a big variety of supported MCUs and development boards. The following list shows some of them:
711

812
+ MicroChip PIC32MX Family
913
+ Atmel SAMA5Dx
@@ -15,15 +19,15 @@ micro-ROS targets mid-range and high-performance 32-bits microcontrollers famili
1519
+ RISC-V boards
1620

1721
<!-- TODO (pablogs): Update this paragraph to a more generic porting guide link -->
18-
Please check [this link](https://cwiki.apache.org/confluence/display/NUTTX/Supported+Platforms) to see the complete list and the status of each board. In case you are interested in porting new boards or MCUs, please check the [next link](https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide).
22+
<!-- Please check [this link](https://cwiki.apache.org/confluence/display/NUTTX/Supported+Platforms) to see the complete list and the status of each board. In case you are interested in porting new boards or MCUs, please check the [next link](https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide). -->
1923

20-
Even though many development boards could be used, we have chosen two of them as references. This page lists the hardware platforms that we use to test and develop micro-ROS, and also accessories that we frequently refer to, such as add-on boards, and JTAG probes.
24+
Among the many boards that can be used potentially by virtue of the variety of RTOSes supported, for the moment we officially supoort the four boards listed and detailed below. These are the hardware platforms that we use to test and develop micro-ROS, with which we also present accessories that we frequently refer to, such as add-on boards, and JTAG probes.
2125

2226
For the ease of use, micro-ROS provides a ready to use example for some development boards. These out-of-the-box examples aim to show micro-ROS capabilities and they are also a starting point for developing embedded ROS 2 applications.
2327

2428
## Reference Platforms {#evaluation-boards}
2529

26-
This section describes the main characteristic of the selected boards.
30+
This section describes the main characteristic of the boards officially supported by the micro-ROS project.
2731

2832
## Olimex LTD STM32-E407
2933

@@ -95,3 +99,18 @@ This little drone features a STM32F405 ARM Cortex-M4 MCU running up to 168 MHz w
9599
- headers with peripheral access: SPI, I2C, UART, 1-wire and GPIO
96100

97101
Examples on how to start developing with this board are available [here](/docs/tutorials/demos/crazyflie_demo/).
102+
103+
## ESP32-DevKitC
104+
105+
<img width="400" src="imgs/4.jpg">
106+
107+
The ESP32-DevKitC is a low-footprint and entry-level development board that is part of the [ESP32 series](https://www.espressif.com/en/products/socs/esp32) from [Espressif](https://www.espressif.com/en). The ESP32 is an ultra-low power consumption dual-core system with two Xtensa LX6 CPUs, exposing a large collection of peripherals and with integrated Wi-Fi and dual-mode Bluetooth. The ESP32-DevKitC has all the ESP32 pins exposed and offers a Flash memory of 4 MB, 448 KB ROM for booting and core functions, 520 KB SRAM for data and instructions and 16 KB SRAM in RTC. The ESP32 comes with a native FreeRTOS support, over which the micro-ROS port has been carried out, both with serial and Wi-Fi transports.
108+
109+
The board specifically supported by the project hosts an [ESP32-WROOM-32E module](https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf), which is an ESP32-based module with integrated flash.
110+
111+
These modules have a complete set of interfaces and peripherals that makes suitable for micro-ROS wireless applications:
112+
- Networking interfaces: Ethernet MAC, Wi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and BLE
113+
- Communication interfaces: SPI, I2C, I2S, UART, SDIO, CAN
114+
- Peripherals: GPIO, ADC/DAC, PWM (LED and Motor drivers)
115+
- Cryptographic hardware acceleration
116+

‎_posts/2020-08-27-esp32.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: micro-ROS porting to ESP32
3+
author: francesca-finocchiaro
4+
---
5+
6+
The micro-ROS team is glad to announce that the pool of boards officially supported by the project has widened! The [ESP32 MCU](https://www.espressif.com/en/products/socs/esp32) is now part of the family. ESP32 is a series of low-cost, low-power microcontrollers with integrated Wi-Fi and dual-mode Bluetooth, widely used for both commercial and industrial purposes.
7+
8+
<img alt="micro-ROS display" src="/img/posts/esp32_cut.png" width="70%"/>
9+
10+
micro-ROS targets mid-range and medium-to-high performance 32-bits microcontrollers families. Up to now, the boards officially supported by the project were solely based on the STM32 series from ST, MCUs featuring ARM Cortex-M processors. On the other hand, the ESP32 is an ultra-low power consumption dual-core system with two Xtensa LX6 CPUs, exposing a large collection of peripherals.
11+
12+
Specifically, the port has been carried out for an Espressif [ESP32-DevKitC-32E](https://www.espressif.com/en/products/devkits/esp32-devkitc), an entry-level development board featuring an [ESP32-WROOM-32E](https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf) module integrating Wi-Fi and Bluetooth functions. The port makes use of FreeRTOS, one of the three [RTOSes](https://micro-ros.github.io/docs/concepts/rtos/) officially supported by the micro-ROS project, which is natively used by this family of boards, and supports the latest Foxy release of ROS 2. It works both with serial and Wi-Fi transports, the latter being particularly appealing as it marks the first hardware support of the micro-ROS project that exploits a natively integrated Wi-Fi antenna. Therefore, thanks to the combination of this highly capable Espressif board with micro-ROS, users will be able to develop wireless ROS2 applications that take advantage of the huge set of peripherals that ESP32 offers: I²C, SPI, I²S, LED drivers, PWM, etc. Furthermore, the ESP32-DevKitC-32E development board perfectly fits the typical requirements of the IoT systems targeted by micro-ROS, as it features a Flash memory of 4 MB, 448 KB ROM for booting and core functions, 520 KB SRAM for data and instructions and 16 KB SRAM in RTC.
13+
14+
The recent port of micro-ROS to ESP32 thus sets a milestone towards expanding the family of MCUs supported by micro-ROS and paves the way for further ports, ensuring this project an ever wider base of hardware support.
15+
16+
In order to try the new port, follow one of the [core tutorials](https://micro-ros.github.io//docs/tutorials/core/overview/) to install the micro-ROS build system, and then follow the instructions below:
17+
18+
```bash
19+
20+
ros2 run micro_ros_setup create_firmware_ws.sh freertos esp32
21+
ros2 run micro_ros_setup configure_firmware.sh int32_publisher -t udp -i [your local machine IP] -p 8888
22+
ros2 run micro_ros_setup build_firmware.sh menuconfig
23+
24+
# Now go to the micro-ROS Transport Settings → WiFi Configuration menu and fill your WiFi SSID and password. Save your changes, exit the interactive menu, and run:
25+
ros2 run micro_ros_setup build_firmware.sh
26+
27+
# Connect your ESP32 to the computer with a micro-USB cable, and run:
28+
ros2 run micro_ros_setup flash_firmware.sh
29+
```
30+
31+
In order to open an agent you can find instructions [here](https://micro-ros.github.io/docs/tutorials/core/first_application_linux/) but we recommend using the docker image:
32+
33+
```
34+
docker run -it --rm --net=host microros/micro-ros-agent:foxy udp4 --port 8888 -v6
35+
36+
```

‎img/posts/esp32_cut.png‎

53.2 KB
Loading

‎img/posts/esp32_scheme.png‎

49.5 KB
Loading

‎scripts/cibuild‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ set -e # halt script on error
44
# Get the list of added files compared to the origin/master (origin/master is the deployed branch)
55
# New files will not be deployed at the moment of this check so htmlproofer should ignore those links refering them.
66
ADDED_FILES=$(git diff --name-only --diff-filter=A origin/master)
7+
78
if grep -q "_docs" <<< $ADDED_FILES; then
89
ADDITIONS=${ADDITIONS:+$ADDITIONS }micro-ros.github.io//docs
910
ADDITIONS=${ADDITIONS:+$ADDITIONS }micro-ros.github.io/blob/master/_docs
10-
else if grep -q "_posts" <<< $ADDED_FILES; then
11-
ADDITIONS=${ADDITIONS:+$ADDITIONS,}micro-ros.github.io//blog
12-
fi
11+
fi
12+
13+
if grep -q "_posts" <<< $ADDED_FILES; then
14+
ADDITIONS=${ADDITIONS:+$ADDITIONS }micro-ros.github.io//blog
1315
fi
1416

1517
IGNORE_HREFS=${IGNORE_HREFS:+$IGNORE_HREFS,}$(ruby -e "puts %w{

0 commit comments

Comments
 (0)