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

PointCloud2 messages exceeding serde_rosmsg buffer size #178

Closed
lucasw opened this issue Jul 30, 2024 · 2 comments · Fixed by #179
Closed

PointCloud2 messages exceeding serde_rosmsg buffer size #178

lucasw opened this issue Jul 30, 2024 · 2 comments · Fixed by #179

Comments

@lucasw
Copy link
Contributor

lucasw commented Jul 30, 2024

I'm receiving progressively larger PointCloud2 generated messages from https://github.com/lucasw/transform_point_cloud/blob/master/scripts/generate_point_cloud.py but once they get too big they don't get successfully decoded in my subscriber (which is using the latest roslibrust commit in master here), and I see:

serde_rosmsg Error: Reached end of memory buffer while reading data
serde_rosmsg Error: Attempted to read beyond the end of decoded value's length

Maybe this code is involved - the 4096 size limit is in the range where I see the issue (but isn't it supposed to keep reading and assemble a full message?):

https://github.com/Carter12s/roslibrust/blob/master/roslibrust/src/ros1/subscriber.rs#L119-L120

@Carter12s
Copy link
Collaborator

Whoops yup that is the smoking gun.

I identified this issue when implementing the logic for service servers and fixed it correctly there:
https://github.com/Carter12s/roslibrust/blob/8e0066cbc2370ab321c7bac333f0748bf2d0ef4b/roslibrust/src/ros1/service_server.rs#L216

But failed to port that fix back to subscriber 🤦

Will patch shortly

@Carter12s
Copy link
Collaborator

Fix is merged to master

Will publish v0.10.2 with fix to crates.io shortly

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

Successfully merging a pull request may close this issue.

2 participants