How to use the PX4 API on ROS platforms

I read the paper “PX4: A node-based multithreaded open source robotics framework for deeply embedded platforms” these days, I found that the PX4 API allows to use the same code on ROS!!! And I didn’t know this before!!!

But I’m confused how to use the PX4 API on ROS. Is there any instructions or use examples? And I don’t find these API codes in the Firmware…

The picture below is from the paper.

I have some questions about this picture:

  1. Does the linux companion computer connect to the embedded controller using mavros package(or
    some similar packages)? Can the real-time needs be met?
  2. Does the attitude control node in linux companion computer sends actuator_controls_0 ( if multicopters ) to embedded controller ?
  3. Does sensor data need to be passed from embedded controller to companion computer?
  4. Is there any video and documentation related to this experiment that using slam and PX4 attitude control on one computer?

Can someone help me? Thanks a lot!!!

@LorenzMeier Could you give me some advice? Thank you very much!!!