Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

custom messages with fixed-length arrays are received in rosjava as an empty array #52

Open
samuelba opened this issue Apr 26, 2016 · 1 comment

Comments

@samuelba
Copy link

As already written in rosjava_core rosjava/rosjava_core#221, but I guess here ist the right place.

I discovered an issue with messages containing an array with a fixed (predefined size).

Message example that is not working:

string[5] names

Message example that is working:

string[] names

If I subscribe in rosjava (Android) to the first message, I always get an empty names array with size zero. However, if I publish the second message with dynamic size 5 (filled with names.push_back("name");) I get the correct size with the content.

Is this a known limitation? Or just a bug?

@adamantivm
Copy link
Contributor

Working with @ernestmc on a project we found this issue with uint8 arrays and provided a fix in #59
I ran out of time with that, but would greatly appreciate validation, improvement and maybe porting to other types that suffer from the same.

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

No branches or pull requests

2 participants