mROS 2 (formally mros2
) realizes a agent-less and lightweight runtime environment compatible with ROS 2 for embedded devices.
mROS 2 mainly offers pub/sub APIs compatible with rclcpp for embedded devices.
mROS 2 consists of communication library for pub/sub APIs, RTPS protocol, UDP/IP stack, and real-time kernel. This repository provides the reference implementation of mROS 2 that can be operated on the Mbed enabled board. Please also check mros2 repository for more details and another implementations.
- ESP32-S3-DevKitC-1
- M5Stack Basic
- M5Stack Core2
- M5Stack CoreS3
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/index.html
After install esp-idf, you need to install jinja2 library in esp-idf environment.
git clone --recursive https://github.com/mROS-base/mros2-esp32.git
cd mros2-esp32
Change ESP_WIFI_SSID and ESP_WIFI_PASS in /workspace/common/wifi/wifi.h
.
Change IP address in /include/rtps/config.h
.
When using DHCP, it is also necessary to specify the IP address.
Flash the app and check the IP address from startup log.
After that chenge the IP address in config.h
and rebuild it.
This repository contains some example applications in workspace/ to communicate with ROS 2 nodes on the host. Of course you can also create a new program file and specify it as your own application.
Please also check mROS-base/mros2-host-examples repository for more detail about the host examples.
Currently, the following examples are available.
- echoback_string
- echoreply_string
- pub_float32
- pub_twist
- sub_pose
- sub_uint16
- m5stack_sample
M5Stack_sample project needs M5Unified and M5GFX libraries.
Git clone these libraries to common/
directory.
The following examples are under development. untested.
- pub_image
- pub_long_string_sub_crc
cd workspace/[Example]/
/* M5Stack Basic / M5Stack Core2 */
idf.py set-target esp32
/* ESP32S3Dev / M5Stack CoreS3 */
idf.py set-target esp32s3
idf.py menuconfig
/* in menuconfig */
Component config -> LWIP -> IPv6 ->
/*Disable IPv6*/
- [ ] IPv6 support (Disable)
/* Save and Quit menuconfig */
idf.py build
/* If an error occurs, try the following*/
python -m pip install jinja2
/* --- */
idf.py -p [PORT] flash
idf.py -p [PORT] monitor
/* To exit monitor, press Ctrl + ] */
If you needs to use mros2 into your ESP-IDF project,
clone this repository to components
directory in your project.
mros2 needs network connection and setting of IP address. Please see Wifi connection example. IP address setting find in upper section Change IP address.