ROS2 -- "[RTPS_READER_HISTORY Error]..." issue in OFFBOARD mode

Hi everyone,

I need some help on how to fix this issue between a ROS2 node publishing to the VehicleAttitudeSetpoint message (and a few other messages), where I get the following message when I try to run it:

“…[RTPS_READER_HISTORY Error] Change payload size of ‘204’ bytes is larger than the history payload size of ‘191’ bytes and cannot be resized. → Function can_change_be_added_nts”

Here’s what works:
I’m using the PixHawk Mini 6c hardware with PX4 V1.14 installed using QGC as usual (through the firmware update feature). The Mini is connected to an Orange Pi 5, and I’m able to get it into OFFBOARD mode to arm and put the vehicle in attitude mode by publishing to the VehicleAttitudeSetpoint topic. So that works great.

What doesn’t work:
I want to clone more vehicles to create a small swam for a lab research project, and each will have their own Topic Namespace for the topics, for example: “/uav_1/fmu/in/…” This way each can distinguish topics from each vehicle on the network. So to do this, per the PX4 – micro DSS documentation, I have to rebuild the PX4 firmware with a modified dds_topics.yaml (uXRCE-DDS (PX4-ROS 2/DDS Bridge) | PX4 User Guide (main)). I’m able to build the custom firmware and install it using QGC (using “make px4_fmu-v6c_default”). After rebooting the Mini 6c, running Micro-XRCE-DDS client works fine, and listing the ROS2 topics I see the new custom Namespace, like “/uav_1/fmu/in/vehicleattitudesetpoint”. But when I go to run the same ROS2 node to go into OFFBOARD attitude control, the vehicle arms but the motors don’t seem to run at their intended speed and this error fills my screen:

2024-02-05 12:34:36.573 [RTPS_READER_HISTORY Error] Change payload size of ‘204’ bytes is larger than the history payload size of ‘191’ bytes and cannot be resized. → Function can_change_be_added_nts

Can somebody help? I don’t understand the problem because it seems to be when I upload a custom-build PX4 firmware (make px4_fmu-v6c_default). I’ve looked everywhere but can’t seem to identify the issue.

It would be nice to be able to create a custom Topic Namespace for each vehicle.



Could you please check the px4_msgs library versions and make sure that it matches the PX4 version ?
I had this error when one of the px4 message changed, and I did the update on one side but not the other side.

This kind of error happen for many of us, but I think the PX4 - ROS2 interface lib from Auterion solved the issue with an automatic check that px4_msgs version matches the one of the px4 (I am not sure though, I just started using it).