Multiple Connections to Autopilot Device

Hello. I’m currently working on a senior design project with some people from the UAV lab at our university. I am a computer science student. We are attempting to add some on-board image processing functionality to their UAV. We would like to have access to the communication between the ground control program and the autopilot unit.

However, it seems our current autopilot unit we are using to test (old ArduPilot) will not send data through USB and telemetry link at the same time. The UAV team is planning to purchase the Pixhawk for their new design, what is the best way to obtain the communication stream between the ground control and autopilot without interrupting it in any way so they are still able to use APM Planner.

We would like the on-board module to perform some waypoint modifications (or other changes if possible) based on image data processed from a camera mounted on a gimbal. Is what we’re thinking possible?

If we cannot have two streams coming out of the autopilot unit, we are looking at having our on-board module be a proxy for the MAVLink data, but this looks like a pain in the ass we want to avoid.

Any help is appreciated.

Hi Sphinx,
The APM2 can in fact send two telemetry streams at once. The 2nd stream is available on UART2 on the unpopulated pins on the side of the board (the opposite side from the USB connector). You will need to add some headers then use a USB to TTL serial adapter to connect to the board.
You also might like to read this page. The same methods used in that page can be used for an APM2 using the UART2.
Note that UART2 is only enabled by default on APM:Rover and APM:Plane with the APM2. With APM:Copter you need to enable it in APM_Config.h and rebuild.
Switching to a Pixhawk isn’t a bad idea anyway as it is a much better board and it has hardware flow control on the serial port, making for more reliable communications to onboard computers.
Cheers, Tridge

Hi,

Sorry for using this post, but I have a similar question.

Is it possible to connect Pixhawk to onboard 2nd computer through USB and Mavlink and simultaneously also communicate with ground control station through 3DR connection and mavlink?

Kind regards,

Jon

[quote=“tridge”]
Note that UART2 is only enabled by default on APM:Rover and APM:Plane with the APM2. With APM:Copter you need to enable it in APM_Config.h and rebuild.[/quote]

Can you tell me what exactly needs to be added to APM_Config.h?

@Jon - yes. We do it all the time. Try this page.
dev.ardupilot.com/wiki/companion … a-mavlink/
Thanks, Grant.