Skip to content

Commit c996a0c

Browse files
Adding Edge Impulse + micro-ROS demo (#389)
* Initial demo page commit * added image * Update index.md * Update _docs/tutorials/demos/edgeimpulse_demo/index.md Co-authored-by: Ralph Lange <ralph-lange@users.noreply.github.com> * Update _docs/tutorials/demos/edgeimpulse_demo/index.md Co-authored-by: Ralph Lange <ralph-lange@users.noreply.github.com> * changed folder name to omit _demo * Removed "_demo" in folder name appearances within header Co-authored-by: Ralph Lange <ralph-lange@users.noreply.github.com>
1 parent 18b99b6 commit c996a0c

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
23 KB
Loading
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Edge Impulse Demo
3+
layout: docs_noheader
4+
permalink: /docs/tutorials/demos/edgeimpulse/
5+
redirect_from:
6+
- /edgeimpulse/
7+
---
8+
9+
<img src="https://img.shields.io/badge/Tested_on-Humble-blue" style="display:inline"/>
10+
11+
![Edge Impulse](ei_logo.png)
12+
13+
---
14+
15+
This example demonstrates how to run an image classification neural network (built using [Edge Impulse](https://www.edgeimpulse.com/)) on the [Arduino Portenta H7](https://store.arduino.cc/products/portenta-h7) and publish the classification results using micro-ROS. The tutorial also shows how to add custom message types to micro-ROS and ROS 2. The motivation behind this demo is to offer a way to add AI functionality to ROS 2 robots without bogging down the main computational unit with additional neural nets. This is especially helpful when the offloading of computational tasks to a companion laptop (for instance) is not an option.
16+
17+
With this approach the MCU publishes inference results using a custom message type `EIResult` (Edge Impulse result), which is made up of multiple `EIClassification` items. The tutorial associated with this demo explains how to go about adding these custom message types. A single classification looks like this:
18+
19+
```
20+
'dog': 0.75
21+
```
22+
23+
It contains a single label (class) and its probability. A full result looks like this:
24+
25+
```
26+
'dog': 0.75,
27+
'cat': 0.25
28+
```
29+
30+
It contains all labels and their probabilities (together summing to 1). The size of the result messages depends on how many labels (classes) your image model is trained on (the example above has two). The code in this example will automatically allocate the necessary memory to support an arbitrary number of labels depending on your model.
31+
32+
33+
34+
By running neural networks on MCUs and publishing their inferences using micro-ROS, it becomes straightforward to experiment with a "distributed" approach to AI in robotics, where the central computer is concerned only with the results of the neural networks and not with sensor data ingest nor calculation.
35+
36+
![Traditional vs distributed approach](traditional_vs_distributed.png)
37+
38+
---
39+
40+
41+
To run this demo yourself, check out the video walk through and instructions given [here](https://github.com/avielbr/micro_ros_ei).
238 KB
Loading

0 commit comments

Comments
 (0)