micro-ROS / micro_ros_espidf_component

micro-ROS ESP32 IDF component and sample code
Apache License 2.0
275 stars 64 forks source link

RTPS_READER_HISTORY Error: Change Payload Size #175

Closed tinducvo closed 1 year ago

tinducvo commented 1 year ago

Background

Problem

Everything works fine until I try to use a non-trivial message size. The following gives an error and when I remove min_battery_voltage and max_battery_voltage, the payload size changes. I used a script to delete my build/components folders and completely rebuild my project:

# battery_voltage is based on nominal resistance value
---
uint32 battery_voltage
uint32 min_battery_voltage
uint32 max_battery_voltage
bool success
{
    "names": {
        "microxrcedds_client": {
            "cmake-args": [
                "-DUCLIENT_SERIAL_TRANSPORT_MTU=1024",
                "-DUCLIENT_CUSTOM_TRANSPORT_MTU=1024",
            ]
        },
        "rmw_microxrcedds": {
            "cmake-args": [
                "-DRMW_UXRCE_TRANSPORT=custom",
                "-DRMW_UXRCE_MAX_NODES=1",
                "-DRMW_UXRCE_MAX_PUBLISHERS=3",
                "-DRMW_UXRCE_MAX_SUBSCRIPTIONS=1",
                "-DRMW_UXRCE_MAX_SERVICES=2",
                "-DRMW_UXRCE_MAX_HISTORY=8",
                "-DRMW_UXRCE_STREAM_HISTORY=8",
                "-DRMW_UXRCE_ALLOW_DYNAMIC_ALLOCATIONS=ON"
            ]
        }
    }
}

=>

2023-02-01 18:25:22.845 [RTPS_READER_HISTORY Error] Change payload size of '20' bytes is larger than the history payload size of '11' bytes and cannot be resized. -> Function can_change_be_added_nts

and

2023-02-01 18:25:22.845 [RTPS_READER_HISTORY Error] Change payload size of '12' bytes is larger than the history payload size of '11' bytes and cannot be resized. -> Function can_change_be_added_nts
tinducvo commented 1 year ago

Didn't recompile on the main machine