About sending command using MAVLINK via USB

653 views
Skip to first unread message

Jason Lin

unread,
Nov 3, 2014, 5:23:18 AM11/3/14
to drones-...@googlegroups.com
Hello everyone,I come form Taiwan.Sorry for my poor English.

I am new to MAVLINK and APM.I have a idea,I want to use a embedded system through USB connecting with APM,without RC to controll.The embedded system is a WindowsXP system,I'll write a C++ program to process image and send command to APM ,let the quadcopter fly autonomous !

Like the below video,this is my old system.The quadcopter will track the green line.


The old system is very unstable ,it is very dangerous!

So I decide to use APM to solve unstable problem.

This is my new system.



I read many information about MAVLINK form website, like the "MavLink Tutorial for Absolute Dummies".I learned the format of MAVLINK package.

So I try to use C++ to decode the package via USB form APM , like this


And this is origin data that I receive from APM.
Now, I have a big problem!

I send command like this format "FE xx xx xx xx..." via USB,but it doesn't wrok!!!!!

How can I let the quadcopter work,like motor spin or arm the APM ?

I have MAVLINK C header,but I can't use it! I don't understand it!

I have download this file "c_uart_interface_example-master",but my system is WindowsXP,it can't compile!

Can someone tell me what should I do that send command to APM without APMPlanner or RC?


Thank you!





Kevin Hester

unread,
Nov 3, 2014, 5:42:22 AM11/3/14
to drones-discuss
Hi Jason,

> How can I let the quadcopter work,like motor spin or arm the APM ?
> I have MAVLINK C header,but I can't use it! I don't understand it!
> I have download this file "c_uart_interface_example-master",but my system is WindowsXP,it can't compile!
> Can someone tell me what should I do that send command to APM without APMPlanner or RC?

It isn't for C++ (currently) but before you go down the road you describe (learning a fair amount about mavlink C++ goo) you might want to try our python API binding kit:


It will probably get your initial communication working much more quickly, and then you can transition to a custom implementation if you want.  If you want to write your own C++ goo rather than using the semi-auto generated code the protocol is documented here: https://pixhawk.ethz.ch/mavlink/

Jason Lin

unread,
Nov 4, 2014, 1:15:31 AM11/4/14
to drones-...@googlegroups.com
Hi kevinh,

Thank you for your reply!

I will try my best to do this!


kevinh於 2014年11月3日星期一UTC+8下午6時42分22秒寫道:
Reply all
Reply to author
Forward
0 new messages