-
Notifications
You must be signed in to change notification settings - Fork 119
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
Deserialization error publishing a LaserScan on ESP32 at certain message sizes #1427
Comments
Some details:
|
Thank you for the instant reply @pablogs9 ! As a quick test, I've reduced the message size a lot and that fixed the Best Effort publisher. That said, "ros2 topic echo /scan" with the Best Effort publisher still freezes after a minute or two. I'll check about recompiling the library, but for now it seems the freezing issue will still keep me from using the Best Effort publisher. I've tried zeroing out the LaserScan message and filling out the intensities array (with dummy values) while using rclc_node_init_default() - I'm afraid the deserialization error is still there. Here is the code to reproduce it. The code works (no deserialization error) when I set BUF_LEN=500, but doesn't work (serialization error) with BUF_LEN=250.
|
@iovsiann You did in fact discover a bug in our middleware! We have fixed this bug here: eProsima/Micro-XRCE-DDS-Client#360. This repository branches has been updated to include this fix. Please give it a try, we will create a new minor release once your feedback is positive. |
@Acuadros95 awesome, thank you! I have recompiled the Arduino library with the output_reliable_stream.c patch and the reliable publisher seems to work properly on my end - with and without intensities.* filled out. |
Nice! The latest minor v2.0.7 releases include the fix. Closing! |
Issue template
Steps to reproduce the issue
Expected behavior
LaserScan message gets successfully published, as in step 3 for issues 1 and 2.
int32 message gets successfully published - and does not freeze after a while - for issue 3.
Actual behavior
Issue 1: Micro-ROS agent receives LaserScan messages, but reports "deserialization error" and thus fails to publish the received messages.
Additional information
The LaserScan dummy publisher sketch is based on the micro-ros_publisher_wifi Micro-ROS Arduino example.
Note that in issue 1, changing just one line of code (BUF_LEN from, say, 1000 to 500 or 600) breaks the successful operation. If I set BUF_LEN to 400 or 800, the sketch works fine.
Note that in issue 2, replacing rclc_publisher_init_default() with rclc_publisher_init_best_effort() for the LaserScan dummy publisher breaks the operation. However, the original micro-ros_publisher_wifi example works fine with rclc_publisher_init_best_effort().
Note that in issue 3, the official micro-ros_publisher_wifi example stops working (specifically, the Micro-ROS agent stops receiving messages) simply after waiting for a couple of minutes or so.
I've searched Micro-ROS issues before opening this ticket and I've noticed a couple of related issues, but I haven't been able to find a solution that would work for me.
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: