Skip to content

Commit

Permalink
Merge pull request #40 from mROS-base/support_esp32
Browse files Browse the repository at this point in the history
Please welcome mros2-esp32 as a new supported platform 🎉
  • Loading branch information
takasehideki authored May 29, 2023
2 parents 24a4a23 + 9fbee6e commit 4adecd0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__pycache__/
__pycache__/
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@ It consists of basic APIs for pub/sub communication, RTPS protocol, UDP/IP stack
Embedded nodes can now communicate directly with native ROS 2 nodes via topic!

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.
[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.
[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.

## Features

- **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.
- mros2 currently uses [embeddedRTPS @ 1410a87](https://github.com/mROS-base/embeddedRTPS/tree/1410a8776660244249a84031ffa78c9bdaa45e19) as it is.
- **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.
- mros2 adopts [embeddedRTPS](https://github.com/mROS-base/embeddedRTPS) with some modifications.
- **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++.
- **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.
- **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.

## Functionalities and limitations

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

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

## Supported platform

Expand All @@ -37,11 +39,12 @@ Please see each repository to learn how to use it.
|:---|:---|:---|:---|
| [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)) |
| [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 |
| [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 |
| [mros2-posix](https://github.com/mROS-base/mros2-posix) | POSIX (pthread) | any machine that runs Linux | partly maintained |

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.
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.

## License

The source code of this repository itself is published under [Apache License 2.0](https://github.com/mROS-base/mros2/blob/main/LICENSE).
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.
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.
2 changes: 1 addition & 1 deletion embeddedRTPS
Submodule embeddedRTPS updated 1 files
+2 −1 Readme.md
5 changes: 5 additions & 0 deletions mros2_header_generator/templates.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* This file was automatically generated by generate_templates.py
* as one of mros2 features. You do not need to modify this.
*/

{%- for includeFile in includeFiles %}
{{includeFile}}
{%- endfor %}
Expand Down
5 changes: 2 additions & 3 deletions mros2_header_generator/templates_generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import re
from os import path
from jinja2 import Environment, FileSystemLoader

arg = sys.argv
Expand Down Expand Up @@ -37,13 +38,11 @@ def main():
includeFile = '#include "' + includeFile + '.hpp"'
includeFiles.append(includeFile)


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


if __name__ == "__main__":
main()

0 comments on commit 4adecd0

Please sign in to comment.