I’ve added a wiki page on how to connect a Raspberry Pi to a Pixhawk using MavLink / MavProxy.
http://dev.ardupilot.com/wiki/raspberry-pi-via-mavlink/
..I wasn’t actually quite able to get the two to communicate although I can see the characteristic MAVLink garble appearing on the RaspberryPi end of the connection. Perhaps the baud rate is incorrectly set (I’ll probably work this out with Tridge tomorrow).
This might be useful in case someone attempts to use a Raspberry Pi + camera to target the balloons in this year’s Sparkfun competition.
There are other boards and probably other methods of doing the communication but this is the board I have and the method that first came to mind for me. All feedback welcome.
-Randy
Erik,
Great, glad that the page has been useful.
So you can override the rc inputs using commands like this:
rc 3 1200 ß this will raise the throttle slightly. It uses the same range as you’ve set up with the radio calibration through the mission planner so it depends on your setup a bit. Normally around 1500 is mid throttle, 1900 or 2000 is full throttle. 1000 is off.
rc 1 1700 ß will make the copter roll right
rc 2 1700 ß will make the copter pitch back
You can change the flight mode in a couple of ways. Some flight modes are coded in so I think for example you can enter rtl and it will switch to RTL mode. Some are not supported though in which case you need to override the flight controller’s flight mode switch.
switch 0 ß will switch the flight mode to the mode held in the FLTMODE1 parameter. This is the top item on the Flight mode set-up screen in the mission planner.
One thing not yet discussed on that page is how to take back control from the RPi. There is a way (because all the android GCSs use it) but I don’t actually know what it is yet.
I imagine you’re doing your testing indoors so I’d say you should stick with stabilize and AltHold flight modes. Also make sure that your throttle failsafe and geofence are disabled, you may even want to disconnect the GPS if you’re indoors.
Best of luck.
-Randy
--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Erik
Kevin Hester (creator of the ArduPilot app and much more) has told me that it should be possible to return control to the pilot’s transmitter by sending zero for all channels:
rc 1 0
rc 2 0
rc 3 0
…
rc 8 0
We should add a way to allow the pilot to yank control away from the RPi but we don’t have that yet (it’s on the to-do list).
-Randy
From: Randy Mackay [mailto:rmac...@yahoo.com]
Sent: February 28, 2014 9:20 AM
To: 'drones-...@googlegroups.com'
Subject: RE: [drones-discuss] Re: Connecting a Pixhawk to Raspberry Pi
Erik,
Great, glad that the page has been useful.
So you can override the rc inputs using commands like this:
rc 3 1200 ß this will raise the throttle slightly. It uses the same range as you’ve set up with the radio calibration through the mission planner so it depends on your setup a bit. Normally around 1500 is mid throttle, 1900 or 2000 is full throttle. 1000 is off.
rc 1 1700 ß will make the copter roll right
rc 2 1700 ß will make the copter pitch back
You can change the flight mode in a couple of ways. Some flight modes are coded in so I think for example you can enter rtl and it will switch to RTL mode. Some are not supported though in which case you need to override the flight controller’s flight mode switch.
switch 0 ß will switch the flight mode to the mode held in the FLTMODE1 parameter. This is the top item on the Flight mode set-up screen in the mission planner.
One thing not yet discussed on that page is how to take back control from the RPi. There is a way (because all the android GCSs use it) but I don’t actually know what it is yet.
I imagine you’re doing your testing indoors so I’d say you should stick with stabilize and AltHold flight modes. Also make sure that your throttle failsafe and geofence are disabled, you may even want to disconnect the GPS if you’re indoors.
Best of luck.
-Randy
From: drones-...@googlegroups.com [mailto:drones-...@googlegroups.com] On Behalf Of Erik V
Sent: February 27, 2014 7:46 PM
To: drones-...@googlegroups.com
Subject: [drones-discuss] Re: Connecting a Pixhawk to Raspberry Pi
Hi !
--
--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/gT9vSoHYTZ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.