rosjava / rosjava_bootstrap

Simple catkin/rosjava plugins for gradle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

samuelba opened this issue · comments

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?

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.