micro-ROS / micro-ROS/micro-ROS-Agent

Connectivity Drop with More Than 5 Devices in Micro-ROS Agent on Docker (Raspberry Pi 5)

未关闭
#233 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
201
派生
111
平均合并
1 天 6 小时
30 天内合并 PR
10

描述

**Description:**
I am running a micro-ROS agent in a Docker container using the prebuilt image (humble) on a Raspberry Pi 5. I have several ESP32 devices with micro-ROS (Humble). When I attempt to connect more than five devices to the agent, I experience connectivity dropouts, where some devices fail to stay connected. With 5 devices, they are successful in subscribing to topics.

I suspect this issue might be related to the configuration flags in the micro-ROS build, particularly those related to client and resource limits. I came across the following parameters:

- `RMW_UXRCE_MAX_CLIENTS`
- `RMW_UXRCE_MAX_SUBSCRIPTIONS`
- `RMW_UXRCE_MAX_SESSIONS`
- `RMW_UXRCE_MAX_NODES`
- `RMW_UXRCE_MAX_PUBLISHERS`
- `RMW_UXRCE_MAX_SERVICES`
- `RMW_UXRCE_MAX_WAIT_SETS`
- `RMW_UXRCE_MAX_GUARD_CONDITION`
- `RMW_UXRCE_MAX_TOPICS`

These parameters seem critical to configuring the agent, especially as I'm dealing with multiple devices where each subscribes to three topics. I suspect increasing the `RMW_UXRCE_MAX_CLIENTS` value might help, but I'm not entirely sure.

**What I've Tried:**
- I attempted to experiment by manually setting `RMW_UXRCE_MAX_CLIENTS` to 1 (as a test), but it did not yield the expected results, as multiple clients could still connect.
- I've tried searching through the documentation, including [Vulcanexus](https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/memory_management/memory_management.html#:~:text=RMW_UXRCE_MAX_NODES%20%3A%20Maximum%20number%20of%20micro,Default%20value%3A%204) for guidance, but I haven't been able to solve the issue.

**Question:**
In order to adjust these flags and rebuild the micro-ROS agent from source, do I need to modify the build configuration in the following file?
- [`src/micro_ros_setup/config/host/generic/client-host-colcon.meta`](https://github.com/micro-ROS/micro_ros_setup/blob/jazzy/config/host/generic/client-host-colcon.meta)

Or should the changes be made in this file instead?
- [`src/uros/rmw_microxrcedds/rmw_microxredds_c/CMakeLists.txt`](https://github.com/micro-ROS/rmw_microxrcedds/blob/jazzy/rmw_microxrcedds_c/CMakeLists.txt)

I believe the latter might be where the flags should be set, but I'm uncertain. Has anyone else experienced similar connectivity issues when connecting more than five devices to a micro-ROS agent on Docker? If so, how did you resolve it?

(I've also noticed a colcon.meta file in the /src folder of my workspace, should the be used?)

Any guidance on where exactly to set the flags for a manual source installation would be greatly appreciated - Or even the correct approach to setting up an agent to allow for more than 20 clients!

Thanks in advance for your help!

**System Details:**
- **Hardware:** Raspberry Pi 5
- **Docker Image:** Prebuilt micro-ROS agent
- **Micro-ROS Version:** Humble on ESP32 devices
- **Number of Devices:** 5+ ESP32 devices
- **Topics per Device:** 3 Topics per device

**Links to Documentation:**
- [Vulcanexus Documentation on Memory Management](https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/memory_management/memory_management.html)
- [micro_ros_setup Repository](https://github.com/micro-ROS/micro_ros_setup/blob/jazzy/config/host/generic/client-host-colcon.meta)
- [rmw_microxrcedds Repository](https://github.com/micro-ROS/rmw_microxrcedds/blob/jazzy/rmw_microxrcedds_c/CMakeLists.txt)

Thank you!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先比较 src/micro_ros_setup/config/host/generic/client-host-colcon.meta、src/uros/rmw_microxrcedds/rmw_microxrcedds_c/CMakeLists.txt 和 workspace 的 /src/colcon.meta。在收集 agent 和 client 日志的同时,使用超过五个 ESP32 设备重现掉线问题。确定正确的配置路径,并且经过测试的设置能够支持预期的 client 数量而不发生连接掉线,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cmake, cpp, docker
领域
devops, embedded-iot, networking
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。