Hello, I managed to write some Arduino code for an ESP32-S3R8 using this library that publishes compressed images to the according ROS topic. However, it only works when using reliable mode, but ideally I would want to use best-effort as a few missed camera frames are not the end of the world for my use case. This not working actually makes sense, when looking into the documentation:
When using Best Effort entities, the maximum serialized size of a topic shall fit in UCLIENT_[XXX]_TRANSPORT_MTU both for outgoing and incoming data.
When using Reliable entities, the maximum serialized size of a topic shall fit in UCLIENT_[XXX]_TRANSPORT_MTU * RMW_UXRCE_STREAM_HISTORY both for outgoing and incoming data.
So naturally, I increased the value of UCLIENT_CUSTOM_TRANSPORT_MTU to 32768, such that it would fit my camera frames (the default value is 512) and recompiled the library. This hugely increases the memory requirements though, much more than I expected. With RMW_UXRCE_STREAM_HISTORY being 4, I assumed I would need a little less than 32768*4 bytes of memory more, but it seems to be way more than that, making my sketch not even compile and stating that it uses multiple hundreds of kilobytes too much. I also tried this with smaller values, and 16384 is still too large.
So my question is: Can I somehow use best-effort modes without the adjustments to UCLIENT_CUSTOM_TRANSPORT_MTU? Or are there other ways I could decrease memory usage, so everything would fit into the ESP32s RAM again?
Hello, I managed to write some Arduino code for an ESP32-S3R8 using this library that publishes compressed images to the according ROS topic. However, it only works when using reliable mode, but ideally I would want to use best-effort as a few missed camera frames are not the end of the world for my use case. This not working actually makes sense, when looking into the documentation:
So naturally, I increased the value of UCLIENT_CUSTOM_TRANSPORT_MTU to 32768, such that it would fit my camera frames (the default value is 512) and recompiled the library. This hugely increases the memory requirements though, much more than I expected. With RMW_UXRCE_STREAM_HISTORY being 4, I assumed I would need a little less than 32768*4 bytes of memory more, but it seems to be way more than that, making my sketch not even compile and stating that it uses multiple hundreds of kilobytes too much. I also tried this with smaller values, and 16384 is still too large.
So my question is: Can I somehow use best-effort modes without the adjustments to
UCLIENT_CUSTOM_TRANSPORT_MTU? Or are there other ways I could decrease memory usage, so everything would fit into the ESP32s RAM again?