micro-ROS / micro-ROS/micro_ros_espidf_component

Connection Unstable: Frequent Session Re-establishment on micro-ROS Agent over Public Network

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

还没有人认领这个 Issue。

主要语言
C
星标
419
派生
124
平均合并
21 小时 35 分钟
30 天内合并 PR
3

描述

## Description:
I am experiencing issues with the stability of my micro-ROS Agent when connecting over Public Network. Specifically, when connecting the ESP32 running micro-ROS to the Agent over a public network, the session frequently re-establishes, often within 1 second of each previous attempt. However, when the connection is made over a local area network (LAN), it remains stable without any issues. Here are the details:

## Issue template
- Hardware description: esp32
- RTOS: freeRTOS
- Installation type: micro_ros_setup
- Version or commit hash: humble
- Connection Type: UDP over mobile hotspot (also tested over home WiFi)

#### Steps to reproduce the issue
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:humble udp6 --port 8090 -v6

#### Expected behavior
[1729343148.590197] info | UDPv6AgentLinux.cpp | init | running... | port: 8090
[1729343148.590364] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1729343156.017862] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x00000000, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 54 5B 53 B8 81 00 FC 03
[1729343156.018347] info | Root.cpp | create_client | create | client_key: 0x545B53B8, session_id: 0x81
[1729343156.018480] info | SessionManager.hpp | establish_session | session established | client_key: 0x545B53B8, address: 0000:0000:0000:0000:0000:ffff:c0a8:3256:9a1f
[1729343156.018760] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x545B53B8, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1729343156.030584] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x545B53B8, len: 16, data:
0000: 81 00 00 00 0E 01 08 00 0A 00 00 00 D8 11 41 0C
[1729343156.031114] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x545B53B8, len: 32, data:
0000: 81 00 00 00 0F 01 18 00 B4 AE 13 67 33 E5 D5 01 B4 AE 13 67 0E DC D5 01 0A 00 00 00 D8 11 41 0C
[1729343156.038679] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x545B53B8, len: 44, data:
0000: 81 80 00 00 01 07 22 00 00 0A 00 01 01 03 00 00 14 00 00 00 00 01 06 00 0C 00 00 00 59 42 5F 43
0020: 61 72 5F 4E 6F 64 65 00 14 00 00 00
[1729343156.058686] info | ProxyClient.cpp | create_participant | participant created | client_key: 0x545B53B8, participant_id: 0x000(1)
[1729343156.058857] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x545B53B8, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 01 00 00
[1729343156.058898] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x545B53B8, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1729343156.065979] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x545B53B8, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1729343156.070573] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x545B53B8, len: 80, data:
0000: 81 80 01 00 01 07 45 00 00 0B 00 02 02 03 00 00 37 00 00 00 0C 00 00 00 72 74 2F 6F 64 6F 6D 5F
0020: 72 61 77 00 00 01 CD 3F 1F 00 00 00 6E 61 76 5F 6D 73 67 73 3A 3A 6D 73 67 3A 3A 64 64 73 5F 3A
0040: 3A 4F 64 6F 6D 65 74 72 79 5F 00 00 01 00 00 00
#### Actual behavior
[1729346723.687383] info | UDPv6AgentLinux.cpp | init | running... | port: 8090
[1729346723.687553] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1729346724.673238] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x00000000, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 7E 5C F9 62 81 00 FC 03
[1729346724.673633] info | Root.cpp | create_client | create | client_key: 0x7E5CF962, session_id: 0x81
[1729346724.673767] info | SessionManager.hpp | establish_session | session established | client_key: 0x7E5CF962, address: 0000:0000:0000:0000:0000:ffff:72f6:edbf:bfb8
[1729346724.674175] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x7E5CF962, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1729346725.547183] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x7E5CF962, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 7E 5C F9 62 81 00 FC 03
[1729346725.547423] info | SessionManager.hpp | establish_session | session re-established | client_key: 0x7E5CF962, address: 0000:0000:0000:0000:0000:ffff:72f6:edbf:bfb8
[1729346725.547811] debug | UDPv6AgentLinux.cpp | send_message | [** <> **] | client_key: 0x7E5CF962, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1729346726.618333] debug | UDPv6AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x7E5CF962, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F 7E 5C F9 62 81 00 FC 03
#### Additional information
Behavior: The session between the ESP32 micro-ROS client and the micro-ROS Agent is frequently re-established (as seen from the micro-ROS Agent logs), sometimes multiple times per second.

Any help or guidance would be appreciated!

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先,使用提供的 Docker 命令复现 ESP32-to-Agent 连接,并比较其在公共网络和 LAN 上的行为。检查 UDPv6AgentLinux.cpp 和 SessionManager.hpp 中记录的入口点,包括 create 和 re-establish 事件。当确定并解决会话反复建立的原因,并在受影响的网络上提供会话稳定运行的证据时,即视为完成。

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

评估

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

把新 issue 发到你的邮箱

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