A discussion page to allow me to add my experiences using a Raspberry Pi 2/3/Zero V1.2/1.3 as a companion computer for Ardupilot/APM/Pixhawk flight boards. I will update my experiences as I learn, feel free to comment and offer tips, it's all free here.
I'm building a github for my experiments: https://github.com/benb0jangles/Companion-Pi
Drone Unit: Raspberry Pi Zero V1.3 + Pi Camera Module
img file: https://drive.google.com/open?id=0B1cVb3uX0f0dQTZzSmVISFdYd3M
Ground Unit: Raspberry Pi 2
img file: <to be added>
Goggles Unit: Raspberry Pi Zero V1.3
img file: https://drive.google.com/open?id=0B1cVb3uX0f0dakFpaTAyVF9HV2s
Ardupilot Technical Questions:
Also, if you have any technical code/hardware questions which you feel may take ongoing contributions and help over an extended timeframe, feel free to ask over on Ardupilot.org technical discussion page here: http://discuss.ardupilot.org/t/companion-pi-2-3-zero/9460
I will update as I get by, please contribute by offering your 'plug & play' wifi adapters using Raspbian Jessie. Also, if you happen to pick up this project, and are working faster than me, then please send us your own .img file experiments. Thanks.
Replies
@xemone that's a really neat PDB. You should have no problem going from regulated 5v output straight to the IO gnd/vin pins. If you want to be paranoid you can go in through the usb as it provides extra protection and polyfuse, but really no need from the PDB BEC.
BTW, don't expect too much performance from pi zero + opencv!!!
I'm currently running a Pixhawk with a PDB+Power module combo unit (specifically: http://www.ebay.com/itm/262694415709) and I want to add a RPi Zero W + Pi camera module for OpenCV.
Anyone here have any experience powering a RPi from a PDB?
The 5V output on the PDB is regulated but I just want a heads up on any potential issues I might run into.
I'm leaning towards sacrificing a spare microUSB cable; less chances of frying something.
Straightforward or add a fuse somewhere?
Seems over at ardupilot.org they've started to pick up on UDP data & video systems using companion boards too. Wonder if http://enroute1.com/ found any of this information here useful for their identical project.
http://discuss.ardupilot.org/t/introducing-apsync/14302
http://ardupilot.org/dev/docs/apsync-intro.html
Posted a reply on there.
benbojangles said:
tech questions go here:http://discuss.ardupilot.org/t/companion-pi-2-3-zero/9460
Brad Goodall said:
I'm running into a bit of an issue with my serial connection. It seems like my pi is able to open a one-way communication path to the pi. When i run mavproxy.py, i get a return that the UAS is in stabilize mode, and "fence breach" and "online 1", but it doesn't do much else, or respond to commands. Any help? running a PI 3 and 2(tested both) with direct connection to the telemetry port on an APM 2.6 via GPIO on the PI.
@PatrickDuffy,
I see you installed clover leaf antennas on the Netis2561, what type of antenna do you have on the ground station ?
Having 2 ports allows transmission on 2 planes Vertical-Horizontal (actually with a cloverleaf it would be like 2 spirals ) did you had a chance to experiment with this ?
Regards
Patrick Duffy said:
Air Unit: Raspberry Pi Zero V1.3 + Pi Camera Module
img file: https://drive.google.com/open?id=0B1cVb3uX0f0dQTZzSmVISFdYd3M
@Fnoop, Yes, the ubiquity hardware on the drone is not ideal and I switched to standard wifi a while ago. The Netis 2561 dual-band wifi dongel is now my preferred adapter. Here's the link on Amazon.
Here's a picture on how I mount the Pi camera on a quad with a gimbal:
I use an extended cable for the camera which you can buy online., and I 3-d printed the mounting brackets and fake go-pro mounting block. In fact the entire quad is 3-d printed. (3-d printer files here) I posted some videos from this quad on YouTube showing a flight that went 4 miles from home.
Here's a pic on how I mounted the Netis WiFi adapter on another quad:
And another type of mount not using a gimbal, but with a servo for tilting/stabilizing. This setup is also 3-d printed.
This setup uses the "A" model of the Raspberry PI, as it's a bit smaller.
So far, I haven't had any issues with these extended cables. The downside is that it's not all in a small package that most folks want. You have to separate the camera from the PI, or if you don't you probably can't mount it on a gimbal. I think Benbojangles has a more compact setup, but without the gimbals.
@Patrick Duffy, I was referring to your blog post using ubiquiti hardware. It's all fairly large PoE stuff that is clunky to use on a drone, particularly a small drone. I know because after reading your blog I went and bought a bunch of ubiquiti hardware and used it quite a bit :) It's powerful and reasonably easy to setup and using airmax is pretty good at keeping connection, but it still drops and the results aren't pretty when it does - that's a major benefit of wifibroadcast. And because it's somewhat of a black box (that's what I meant by proprietary, even if it does run a hacked version of linux that doesn't adhere to GPL) you have no programmatic control over the connection from the companion computer. If you've moved to ordinary wifi dongles like I have then it's easier but you lose the airmax benefits.
I have raspberry 2/3/zero with various wifi dongles and it's a fun diy solution but it's not ideal. I still haven't found a good cable or case for the camera that is flexible, safe and tidy for mounting on a drone. The latency and range is fine if you're flying in clear air at altitude doing say slow AP work, if you're having fun in a park/forest/field/anywhere with stuff to crash into, the latency is too high. Forget it for racing. But I've used it for aerial downward-looking research and it's been great.
It would be fantastic if some small company came up with a 'open fpv pack' that people could just buy and use for an open fpv/video solution. A small, neat casing for say a raspberry zero, tilting camera and wifi dongle with external antenna support and an sd card ready to go, sort of like what Craft and Theory have done for the frsky telemetry.
I'm also trying different hardware to see if incremental improvements can be made. The odroid xu4 with the ocam supports DMA uncompressed video @ 120fps so should support a much lower latency, hardware mfc encoding is just coming alive, and it has more horsepower for doing opencv. I've also got a snickerdoodle on order, this is an exciting long term possibility as it's a small form factor with onboard mimo wifi and interesting possibilities with hdmi in or using the fgpa for custom video processing/transfer.