micro_ros_setup: NotEnoughMemoryException while publishing "long" msg

Hi, I’m trying to publish long massages (Images) with micro-ros. I received this error: terminate called after throwing an instance of 'eprosima::fastcdr::exception::NotEnoughMemoryException' what(): Not enough memory in the buffer stream Aborted (core dumped) I checked the meaning and according to eProsima it means that my msg buffer memory is too small. The buffer default is very small, I tried to publish a string and got the error for string longer than 2 characters. How can I increase the buffer size?

Regards, Dor.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (12 by maintainers)

Most upvoted comments

It works now with this configuration :

{
    "names": {
        "rmw_microxrcedds": {
            "cmake-args": [
                "-DRMW_UXRCE_MAX_NODES=1",
                "-DRMW_UXRCE_MAX_PUBLISHERS=1",
                "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=0",
                "-DRMW_UXRCE_MAX_SERVICES=0",
                "-DRMW_UXRCE_MAX_CLIENTS=0",
                "-DRMW_UXRCE_MAX_HISTORY=12"
            ]
        },
        "microxrcedds_client": {
            "cmake-args": [
                   
                "-DUCLIENT_UDP_TRANSPORT_MTU=4096",
                  
            ]
        }
    }
}

Thank you so much for the help.