Deserializing error for string type

Open
#234 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Reproduce the service call on the STM32F767ZI with a string field using ROS 2 Humble, then inspect the executor failure at ucdr_deserialize_sequence_header while parsing the nested message type. The issue is done when the MCU accepts and handles the service call without a deserialization error, while non-string service calls continue to work.

Written by the indexing model from the issue text.

Description

Describe the bug
String types in service types cause microROS on the MCU side to fail in the executor due to a deserializing error. Running it through a debugger it fails in ucdr_deserialize_sequence_header when parsing the nested message type.

Service calls with non-string types work as expected. I've verified it's not a buffer overflow since the buffer size >> bytes received. There is also no packet corruption in UDP traffic, the dest packet and src packet match 1:1.

To Reproduce
Steps to reproduce the behaviour:

  1. On MCU, init service with service type that has a string type
  2. On host side, call service

Expected behaviour
The MCU accepts the service call and handles accordingly.

Actual behaviour
Executor fails due to deserialization error.

System information (please complete the following information):

  • OS: Ubuntu 22.04
  • ROS 2 Humble
  • MCU: STM32F767ZI
Dominant language
C++
Stars
201
Forks
111
Avg merge
1d 6h
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micro-ROS/micro-ROS-Agent

All issues in micro-ROS/micro-ROS-Agent

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.