micro-ROS / micro_ros_setup

Support macros for building micro-ROS-based firmware.
Apache License 2.0
359 stars 131 forks source link

Issue while increasing the data size more than 495 Bytes for Best-effort stream #620

Closed SiddharthZokarkar closed 1 year ago

SiddharthZokarkar commented 1 year ago

Hello

I am using best-effort stream communication for publisher and subscriber.

The publisher and subscriber are working fine for data upto 495 Bytes.

But after increasing the data over 495 Bytes, the publisher is not publishing the topic data (although it is showing the published topic name in ros2 topic list) and the subscriber is showing a serialization error as shown in the below picture.

Serialisation error best effort stream

app-colcon.meta

app-colcon meta

I am not able to understand the problem . It will be great if anyone can help me to figure out the problem.

Thank you very much!!

SiddharthZokarkar commented 1 year ago

Hello @pablogs9 ,

I am struggling to increase the data length using Best-effort stream over 495 Bytes. Is that a limit ? Or is there any way to increase the size?

Kindly give your suggestions. Thank you so much.

Acuadros95 commented 1 year ago

Hi @SiddharthZokarkar,

In this case the transport used is custom, as the provided configurations (udp, serial, ...) are used only for linux builds. Rebuild your micro-ROS library using the following configuration parameter: UCLIENT_PROFILE_CUSTOM_TRANSPORT

SiddharthZokarkar commented 1 year ago

Hello @Acuadros95 ,

Thanks for the reply. I am using inbuild Serial transport on a Linux system instead of a custom transport.
What is the procedure to increase the data size more than 495 Bytes?

I tried by changing UCLIENT_SERIAL_TRANSPORT_MTU 4096 but it is not working.

Kindly guide me. Thanks

Acuadros95 commented 1 year ago

I tried by changing UCLIENT_SERIAL_TRANSPORT_MTU 4096 but it is not working.

You need to use the UCLIENT_PROFILE_CUSTOM_TRANSPORT parameter instead of the Serial one.

SiddharthZokarkar commented 1 year ago

Ok thank you so much!!