I’ve installed a micrortps agent on a Linux host communicating with a PX4 SITL running in a docker. I’ve ROS2 foxy installed on my machine (Ubuntu 20.04). Ideally, my ROS2 applications interact directly with the agent. However, it seems that the rtps_agent is a pure RTPS application, i.e. when interacting with ROS2 we need to take into account the prefixing of ROS2 (see Topic and Service name mapping to DDS). When I used the “rt” (ros-topic) namespace when running the agent, “ros2 topic list” contains the topics published by the agent, but a ROS2 subscriber in a test application does not receive messages from the agent.
In addition, I have a strange issue: when the agent is running, the command line tool “ros2 topic list” stops with a bad_alloc exception . The same happens in case of the vehicle_gps_position_listener example from px4_ros_com. The problem seems to be that the ros2 daemon stops. A workaround seems to run another ROS application in parallel.
 $ ros2 topic list
terminate called after throwing an instance of ‘std::bad_alloc’
Aborted (core dumped)