micro-ROS / micro-ROS/micro_ros_arduino

esp32 can only publish up to 2hz. slow performance

Open
#1,817 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
576
Forks
146
PR merge metrics
No merged PRs in 30d

Description

## Issue template

- Hardware description: esp32 wroom32 nodeMCU dev board
- Installation type: downloaded zip library and included it in arduino IDE
- Version or commit hash: humble running microros arduino 2.0.7

#### Steps to reproduce the issue
i modified the example micro ros publisher which should publish an integer regulary. I modified the timer period to 20ms (anything under 600 doesnt seem to work as expected) and got rid of the 100ms delay in the main loop.

After uploading the code, i ran the microROS Agent which i cloned into my src and built then ran ' ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyUSB0'

#### Expected behavior
ros2 topic echo /topic_name should display the integers being printed at around 50Hz
#### Actual behavior
https://asciinema.org/a/D1Z1pUeNKVQrnGEfAYVl7WP9p

integers published up to 2hz and are laggy. get published together instead of in evenly spaced intervals
#### Additional information
Ive used microROS on esp32 with microROS agent and have never had any issue. Only until i started adding custom message types did these issues start

Im using rmw_fastrtps_cpp but even switching to rmw_cyclonedds_cpp did not solve the issue
Plugging the esp32 into a raspberry pi and running the agent also did not fix the issue so i think the issue lies with the library and not the agent

pehaps a fault in a new update

Contributor guide

Open the contributing guide

Research direction

Start with the modified micro-ROS publisher example and reproduce the 20ms timer behavior using the ESP32, Arduino IDE, and the serial micro_ros_agent command shown in the issue. Compare behavior with and without custom message types and with rmw_fastrtps_cpp versus rmw_cyclonedds_cpp. Done means identifying the source of the batching and lag and confirming publishing near the expected 50Hz.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot, robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.