micro-ROS / micro-ROS/micro_ros_platformio

Deserialization errors and eventual micro-ROS agent crash with best-effort publishers.

未關閉
#167 6 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
334
分支
111
PR 合併指標
30 天內沒有已合併 PR

描述

Issue template

  • Hardware description: Arduino Portenta H7
  • RTOS: Mbed OS
  • Installation type: PlatformIO
  • Version or commit hash: Galactic, Humble (I've tried both)
Steps to reproduce the issue

I am running micro-ROS on an Arduino Portenta H7, communicating via UDP with a computer running ROS2. I've been testing with both Galactic and Humble (two different systems, one running Ubuntu 20 and the other 22).

I have four publishers in micro-ROS, each publishing a custom message (containing a builtin_interfaces/Time, a uint8, and two float32s) at 100 Hz using best effort QoS. I also have one publisher publishing a custom message (a builtin_interfaces/Time, and a uint8) at 1 Hz.

After the micro-ROS agent is started, communication works for some time, but deserialization errors start to appear, mostly:

[1736739981.033497] error    | InputMessage.cpp   | log_error                | deserialization error  | buffer: 
0000: 00 00 00 00 00 00

and occasionally:

[1734728823.613239] error    | InputMessage.cpp   | log_error                | deserialization error  | buffer: 
0000: 81 01 49 12 07 01 1F 00 12 AD 00 A5 3E ED 65 67 D3 90 66 22 00 00 00 01 00 00 00 00 00 00 00 00
[1734728823.615098] error    | Processor.cpp      | process_write_data_submessage | deserialization error processing WRITE_DATA submessage | client_key: 0x16BCCD79

Messages continue to publish successfully at around 100 Hz, but eventually the micro-ROS agent crashes with the following message:

terminate called after throwing an instance of 'eprosima::fastcdr::exception::BadParamException'
  what():  Unexpected byte value in Cdr::deserialize(bool), expected 0 or 1

Sometimes it takes a while to crash, and other times it only takes a few minutes. I've also tried publishing with reliable QoS. In that case, the micro-ROS agent doesn't crash or have deserialization errors (at least not as quickly), but each topic is only published at about 1 Hz.

Expected behavior

The micro-ROS agent runs indefinitely with no deserialization errors and doesn't crash.

Actual behavior

Deserialization errors and crash.

Thanks!

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 Arduino Portenta H7、micro-ROS agent、UDP 傳輸、自訂訊息以及指定速率的 best-effort 發布者重現問題。檢查 InputMessage.cpp 和 Processor.cpp 中回報的反序列化路徑,包括 Fast CDR BadParamException。當 agent 在發布者持續以預期速率運作的同時,能夠無限期執行且不出現反序列化錯誤或當機時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
arduino
領域
embedded-iot, networking
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。