ROS2 Galactic - Changing RMW to FastRTPS Causes Errors
Our ROS project currently runs without issues while using the CycloneDDS middleware. However, attempting to change to FastRTPS (by setting export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
)
When switching the middleware, we're seeing errors like
Transition is not registered., at /tmp/binarydeb/ros-galactic-rcl-lifecycle-3.1.3/src/rcl_lifecycle.c:355
[]: Unable to start transition 1 from current state configuring: Could not publish transition: cannot publish data, at /tmp/binarydeb/ros-galactic-rmw-fastrtps-shared-cpp-5.0.2/src/rmw_publish.cpp:59, at /tmp/binarydeb/ros-galactic-rcl-3.1.3/src/rcl/publisher.c:248, at /tmp/binarydeb/ros-galactic-rcl-lifecycle-3.1.3/src/rcl_lifecycle.c:368
We've tried completely rebuilding the project multiple times (even with RMW_IMPLEMENTATION=rmw_fastrtps_cpp
), but can't seem to get anything to work. Even tried within a docker container to see if it was an environment specific thing.
Has anyone run into anything similar? Or, does anyone have any suggestions about where to look?
Edit: Remove a warning message that actually seems to appear when using both Cyclone or the FastRTPS middleware.
Edit: Update 8/30
It does look like our problems center on the lifecycle node transitions. I was able to actually get past most of our issues by switching to SYNCHRONOUS publishing mode (it looks like Nav2 was the culprit for a decent chunk of our tests).
Now, the majority of tests are passing, but currently stuck with this issue.
string capacity not greater than size [ERROR] [1661908949.476389087] []: Unable to start transition 1 from current state configuring: Could not publish transition: cannot publish data, at /tmp/binarydeb/ros-galactic-rmw-fastrtps-shared-cpp-5.0.2/src/rmw_publish.cpp:59, at /tmp/binarydeb/ros-galactic-rcl-3.1.3/src/rcl/publisher.c:248, at /tmp/binarydeb/ros-galactic-rcl-lifecycle-3.1.3/src/rcl_lifecycle.c:368
(code formatting seems to be hit or mis)
The string capacity not greater than size
seems to be the root of the issue, but I can't find anything thast indicates what the problem actually is. When running with rmw_fastrtps_dynamic_cpp, I actually get a bit more information and the transition seems to go through because there's no error...
[ERROR] [1661910889.467231733] [rmw_fastrtps_dynamic_cpp]: rosidl_generator_c_String had invalid data