Connecting components such as camera to autopilot and QGC

Hi,

I’m facing the problem of connecting multiple components such as camera and gimbal to autopilot. Basically what I would like to do is to control my autopilot, camera, and gimbal through QGroundControl remotely. Each component is part of the same system.

I’m using DJI’s autopilot but with MAVLink interface I created.

What I don’t really understand right now is how to connect those components together and if MAVSDK is going to help me with it or not.

In first I thought that each component opens its own UDP/TCP link to the ground station and behaves like a separate part of the system. But then I saw an image of those components connected at 2:11 here. In the image it seems like each component (camera, gimbal) is connected directly to the autopilot and there is only 1 connection coming out to the MAVSDK and ground station itself.

I’m kind of confused to be honest. Can someone please clarify this to me? What’s the “correct” way of doing this? And can the MAVSDK be useful at all in this situation?

I can see now that in px4 firmware messages are forwarded to other components from autopilot itself. Is this a common usage? Should I, therefore, implement this message forwarding in my MAVLink interface as well?