Skip to content

Commit 4adecd0

Browse files
authored
Merge pull request #40 from mROS-base/support_esp32
Please welcome mros2-esp32 as a new supported platform 🎉
2 parents 24a4a23 + 9fbee6e commit 4adecd0

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__pycache__/
1+
__pycache__/

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,29 @@ It consists of basic APIs for pub/sub communication, RTPS protocol, UDP/IP stack
55
Embedded nodes can now communicate directly with native ROS 2 nodes via topic!
66

77
This repository maintains the communication layer of mROS 2, that mainly offers pub/sub APIs compatible with [rclcpp](https://docs.ros2.org/dashing/api/rclcpp/index.html) for embedded devices.
8-
[ROS 2](https://docs.ros.org/en/dashing/) is a de-fact platform for the robot system development, and provides pub/sub communication infrastructure with the DDS/RTPS protocol.
8+
[ROS 2](https://docs.ros.org/en/dashing/) is a de-fact platform for the robot system development and provides pub/sub communication infrastructure with the DDS/RTPS protocol.
99

1010
## Features
1111

12-
- **Agent-less**: a node on mROS 2 autonomously discovers communication nodes on the host with the feature of [embeddedRTPS](https://github.com/mROS-base/embeddedRTPS). It means no agent/bridge is required for pub/sub communication from the embedded devices.
13-
- mros2 currently uses [embeddedRTPS @ 1410a87](https://github.com/mROS-base/embeddedRTPS/tree/1410a8776660244249a84031ffa78c9bdaa45e19) as it is.
12+
- **Agent-less**: A node on mROS 2 autonomously discovers communication nodes on the host. No agent/bridge is required for pub/sub communication from the embedded devices.
13+
- mros2 adopts [embeddedRTPS](https://github.com/mROS-base/embeddedRTPS) with some modifications.
1414
- **Lightweight**: mROS 2 APIs are implemented by C++ to be operated on the embedded devices. All software stacks are also implemented only in C/C++.
15-
- **Real-time**: mROS 2 employs the real-time kernel (e.g., [TOPPERS kernel](https://www.toppers.jp/en/project.html), [Mbed OS](https://os.mbed.com/mbed-os/)) as the runtime platform in order to enhance the real-time capability.
15+
- **Real-time**: mROS 2 uses the real-time kernel (e.g., [TOPPERS kernel](https://www.toppers.jp/en/project.html), [Mbed OS](https://os.mbed.com/mbed-os/)) as the runtime platform in order to enhance the real-time capability.
1616

1717
## Functionalities and limitations
1818

19-
Here are functionalities that mROS 2 offers for you, and current limitations (a.k.a call for your contibutions!).
19+
Here are the functionalities that mROS 2 offers for you, and current limitations (a.k.a call for your contributions!).
2020

2121
- Pub/Sub communication via Topic is supported
22-
- [Built-in-types](https://docs.ros.org/en/foxy/Concepts/About-ROS-Interfaces.html#field-types) except for `wstring` (UTF-16)
23-
- Please check [mros2-asp3-f767zi#exapmle-applications](https://github.com/mROS-base/mros2-asp3-f767zi#example-applications) for more details.
22+
- [Built-in-types](https://docs.ros.org/en/foxy/Concepts/About-ROS-Interfaces.html#field-types)
23+
- `wstring` (UTF-16) is not provided due to its difficulty in verification, but it is unlikely to be used.
2424
- `array` types are not supported
2525
- Some custom message types (e.g., Twist, Pose)
26-
- We think variable-length types and types exceeding one packet cannot be handled, probably due to the limitation of lwIP.
26+
- Please check [mros2-mbed#generating-header-files-for-custom-msgtypes](https://github.com/mROS-base/mros2-mbed#generating-header-files-for-custom-msgtypes) for more details.
27+
- Fragmented message types (that exceed one packet) are experimentally supported. See [PR#36](https://github.com/mROS-base/mros2/pull/36) for more details.
28+
- We think variable-length types cannot be handled, probably due to the limitation of lwIP.
2729
- Service, Actions, and Parameters are not supported
28-
- Please let us know if you want to use them as soon as possible. We can consider of raising the priority of these supports.
30+
- Please let us know if you want to use them as soon as possible. We can consider raising the priority of these supports.
2931

3032
## Supported platform
3133

@@ -37,11 +39,12 @@ Please see each repository to learn how to use it.
3739
|:---|:---|:---|:---|
3840
| [mros2-asp3-f767zi](https://github.com/mROS-base/mros2-asp3-f767zi) | [TOPPERS/ASP3](https://www.toppers.jp/en/project.html) | [STM32 NUCLEO-F767ZI](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) | currently supported up to v0.3.2 (see [status](https://github.com/mROS-base/mros2-asp3-f767zi/issues/74)) |
3941
| [mros2-mbed](https://github.com/mROS-base/mros2-mbed) | [Mbed OS 6](https://github.com/ARMmbed/mbed-os) | Mbed enabled boards having an Ethernet port (See [detail](https://github.com/mROS-base/mros2-mbed#supported-environment)) | well maintained and easy to try |
42+
| [mros2-esp32](https://github.com/mROS-base/mros2-esp32) | [ESP-IDF FreeRTOS](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos_idf.html) | ESP32 boards with 2.4 GHz Wi-Fi (See [detail](https://github.com/mROS-base/mros2-esp32#supported-environment)) | well maintained |
4043
| [mros2-posix](https://github.com/mROS-base/mros2-posix) | POSIX (pthread) | any machine that runs Linux | partly maintained |
4144

42-
Please let us know if you have a request for a support of board/kernel, or if you could implement this layer on another platform.
45+
Please let us know if you have a request for support for other boards/kernels, or if you could implement this layer on other platforms.
4346

4447
## License
4548

4649
The source code of this repository itself is published under [Apache License 2.0](https://github.com/mROS-base/mros2/blob/main/LICENSE).
47-
Please note that this repository contains [embeddedRTPS and its third party libraries](https://github.com/mROS-base/embeddedRTPS#third-party-libraries) as the submodule, and also check their Licenses.
50+
Please note that this repository contains [embeddedRTPS and its third-party libraries](https://github.com/mROS-base/embeddedRTPS#third-party-libraries) as the submodule, and also check their Licenses.

embeddedRTPS

mros2_header_generator/templates.tpl

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* This file was automatically generated by generate_templates.py
3+
* as one of mros2 features. You do not need to modify this.
4+
*/
5+
16
{%- for includeFile in includeFiles %}
27
{{includeFile}}
38
{%- endfor %}

mros2_header_generator/templates_generator.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import sys
33
import re
4+
from os import path
45
from jinja2 import Environment, FileSystemLoader
56

67
arg = sys.argv
@@ -37,13 +38,11 @@ def main():
3738
includeFile = '#include "' + includeFile + '.hpp"'
3839
includeFiles.append(includeFile)
3940

40-
41-
env = Environment(loader=FileSystemLoader('../mros2/mros2_header_generator'))
41+
env = Environment(loader=FileSystemLoader(path.dirname(__file__)))
4242
template = env.get_template('templates.tpl')
4343
datatext = template.render({ "includeFiles":includeFiles, "pubMsgTypes":pubMsgTypes, "subMsgTypes":subMsgTypes })
4444
with open(os.path.join(app+"/templates.hpp"), "wb") as f:
4545
f.write(datatext.encode('utf-8'))
4646

47-
4847
if __name__ == "__main__":
4948
main()

0 commit comments

Comments
 (0)