Open Ryanf55 opened 11 months ago
Hello @Ryanf55, this is a well-known problem and IMO not really a micro-ROS issue.
The key is that the ROS 2 ros_discovery_info
topic has a significant change on its type rmw_dds_common::msg::dds_::ParticipantEntitiesInfo_
. They have reduced the size of an array from 24 to 16 for this very same topic, making it incompatible between ROS 2 distros:
Specifically, if your Humble installation receives an Iron ros_discovery_info
data representation will not be compliant to the Humble deserialization, making its deserialization unpredictable a very likely to throw an exception.
In summary, this is a ROS 2 distro incompatibility issue and shall be solved if you ensure that your Humble environment does not have any interaction with an Iron environment (local or remote).
HI Pablo,
thanks for the info. Just FYI, I do not have Iron installed, and there are no other ROS 2 developers on my home network, so I don't think that's the issue. Everything is on humble.
Ardupilot targets ros2 humble only.
You have the very same error that we found some weeks ago.
How are you building the micro-ROS Agent? Are any docker in your system?
Because of this line #26 0x00007ffff78c7618 in eprosima::fastdds::rtps::SharedMemChannelResource::perform_listen_operation(eprosima::fastrtps::rtps::Locator_t) () from /opt/ros/humble/lib/libfastrtps.so.2.6
it seems that the message that raises the error is in your same computer and communicating via shared memory.
We are building the micro-ROS with colcon, with the humble
branch in our ROS workspace. This is all on host, no docker.
Fast-dds is installed with the humble binaries.
Can you provide a Dockerfile with a replicator without the Ardupilot part?
Can you provide a Dockerfile with a replicator without the Ardupilot part?
I can try. The MicroXRCE DDS Agent is heavily tied to ArduPilot right now; it may be hard to build a standalone example to reproduce.
Would it be acceptable to provide a dockerfile with ArduPilot already built and running? Then you can just run it against MicroROS on your host OS built with debug and run under GDB?
That would be acceptable as far as everything runs inside a Docker.
Thanks. Can you assign this ticket to me. I can get you the info a few days.
Describe the bug When running the MicroROS agent, it periodically crashes with
std::bad_alloc
.To Reproduce Steps to reproduce the behavior:
Expected behaviour
The agent runs reliably without an allocation error.
System information (please complete the following information):
3.0.5
Additional context
Here's the debug logs at verbosity 6 while running under gdb: