Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ArtificialCleverness opened this issue Oct 19, 2024 · 0 comments

Comments

@ArtificialCleverness
Copy link

ArtificialCleverness commented Oct 19, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant