Connecting to the microRTPS_agent

Hi, i’m working on making a simulator communicate with PX4 using fastRTPS. Long story short, doing this would be great, but i am currently very stuck.

What i want

I want my simulator to communicate with the microRTPS_agent, just like ROS2 does.

What I’ve done so far

  • I’ve managed to make ROS2 and PX4 communicate using fastRTPS. The microRTPS_agent runs and etc.
  • I’ve defined the messages the simulator needs as .idl files and created publishers/subscribers using the fastrtpsgen tool.

Where I am stuck

I can’t seem to figure out how to make a cpp program communicate with the microRTPS agent. This is akin to figuring out how ROS2 communicates with the microRTPS_agent. Similarly, how does PX4 communicate with the microRTPS_client?.

The documentation is very vague about what the microRTPS_agent and microRTPS_clients are. E.g.

The Agent runs as a daemon process on an offboard computer (outside the flight controller). This agent watches for uORB update messages from the Client and (re)publishes them over RTPS, and also subscribes to “uORB”…

This doesn’t make it clear to me what types the agent is in terms of Fast DDS/RTP lingo. Is it a server or a domain participant? Are ROS2 and PX4 domain participants?

I honestly don’t know if i am even asking the right questions here! Any advice would be greatly appreciated!