PixHawk 2 communication

Hello everyone,

I want to develop a swarm of 10 drone. For this I intend to use the Pixhawk 2 as a flight controller. The development of the software is a company that will take care of it but the question that I often ask myself: “how can you communicate with the pixhawk from the software?” And I’m not able to answer it …

Thanks in advance for your reply :slight_smile:

Etienne

Hi,
Pixhawk runs a software called flight stack. One of the two main flight stacks is Ardupilot. You can communicate with pixhawk via a communication protocol called MAVLink. You can communicate with pixhawk using a software tool called Ground Control Station (GCS). On windows there is Mission Planner. On linux there is APM Planner and QGroundControl. These tools communicate with pixhawk physically via a USB cable, and using MAVLink protocol. You can also write your own code to communicate with pixhawk via UART using MAVLink protocol.
I hope this answers your question.

3 Likes

Salahuddin

Clearly you are articulate and succinct in your response. :slight_smile: There are many blogs, forums, articles and videos out there, but I am not aware of anyone maintaining a living eBook on the whole subject. It is just too dynamic, and many people I speak with are all-to-assuming that everyone understands what they are talking about.

Perhaps something for you to consider?

We need a reference that is constantly updated, and not only explains what and why, but also how.

I would not hesitate to pay for such a reference.

(Yes, I am new to this and struggling to learn builds on my own.)

1 Like

Thank you for your reply. And if I order from the same software, several drone per protocol MAVlink, can there be interference between each?

Yes, I agree with you :slight_smile:

all the communication between pixhawk and external devices such as your ground control station is done with Mavlink, the protocol uses parameters to identify the intended vehicle so with a point to multi-point network infrastructure vehicles will only react to instructions intended for them. Mavlink is also capable of simple network routing allowing you to relay messages or directly address the individual Mavlink enabled components of a vehicle. To get swarming setup you need to decide how you will communicate with the multiple vehicles, and find or design a gcs to generate the specific commands for each vehicle. I think Mission Planner support’s simple follow the leader type swarming, but nothing like that Intel swarm display. The vehicles themselves don’t care one way or the other about swarming and need no modification or parameter change other than to be sure they each have a unique vehicle id number

1 Like

UGCS has Drone Dance Controller feature on it’s enterprise version. It can do advanced swarming … but it is $2000+

1 Like

When I last used Mission Planner, I hit the Ctrl + F to bring up the advanced menu… I saw a button called SWARM in there. Not sure what it does or if it’s fully functional, but you may want to take a look at that.

1 Like

Thanks for the explanation I know I just learned something.:slight_smile:

thats whats behind that button

3 Likes

Thank you for your clarifications, you have enlighten me :slight_smile:

This is exactly what I need !! I contact them for more info. Thank you! :wink:

I’m not sure what’s your purpose for these drones. If you just want to play a team show, the best approach is:

  1. Plan the route for each drone, you might need some home made program to do that.
  2. The route should be time sensitive, and each drone must reach destination on time.
  3. Synchronize the time in each drone
  4. Broadcast the start message to each drone at the same time.
  5. There is no need to do communication during the flight. thus you can use any amount of drones, like one thousand.

However, so far I don’t think any open source solution (on board software and ground station software) can handle that.

1 Like

This has not been not a swarm control yet. But you can control multiple drones on the same screen using PixHawk with Andruav as in this video https://youtu.be/To3sngcdvh4.
If you are interested we can work together to make it more suitable for your purpose.
Regards,
M. Hefny

1 Like

Hi Etienne_compain.

One way to communicate is through MavLink many persons say than this is easy. Other way is use

mini USB
hal.console -> print(message to company)
hal.console -> write(message to company)
hal.console -> read(message from company)

UART PORT A
hal.uartA -> print(message to company)
hal.uartA -> write(message to company)
hal.uartA -> read(message from company)

More over, you can use ports uartB, uartC and uartD. But, you need to configure this ports in mission Planner (or APM planner) without protocol (-1). I recommend upload the next sketch if you want to try by this way.

./waf build --target examples/UART_test --upload

By this way you can communicate each PixHawk with one computer aboard and each computer communicate (via wifi or other ) at one computer (Master).

Good Luck!

Hello my friend, is it possible that we can speak on the phone, I have a similar set up and would love to have your help on some projects we have, can we set up a meeting on the phone?

Hello, I would like to have a communication with you regarding the same. Can we have some way of communication? Here I found that you have message settings disabled. Can you please message me at your convenience so that we can communicate.

Regards,
Harish

How to do Agent Oriented Programs (A-O-P) to control multiple drones at same time??