Companion: Pi 2/3/Zero

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.

3691291461?profile=original

3691291190?profile=original

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 herehttp://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.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

    • @Benbojangles, I've just looked at this page https://github.com/DroidPlanner/Tower/wiki/Custom-video-stream - am I misreading or can it be done on udp 5700, or is this solely for solo?

      DroidPlanner/Tower
      Ground Control Station for Android Devices. Contribute to DroidPlanner/Tower development by creating an account on GitHub.
    • might well be right there Jon, give it a test and let us know. My reasoning was based on a reply to my comment here: http://diydrones.com/profiles/blogs/tower-v3-2-1-release?id=705844%...

      I tried simultaneous UDP video & UDP telemetry but the video just black-screened.

    • Pi2 Pi camera & Tower - it works as per below, but I need to add the Pi video command to rc.local. I haven't managed to get it to work yet with both commands in the rc.local file

      rc.local file:

      echo $PATH

      PATH=$PATH:/bin:/sbin:/usr/bin:/usr/local/bin

      export PATH

      cd /home/pi

      screen -d -m -s /bin/bash mavproxy.py --master=/dev/ttyAMA0 --baudrate 115200 --aircraft MyCopter --out=192.168.0.22:14550

      ) > /tmp/rc.log 2>&1

      SSH in:

      raspivid -n -t 0 -w 640 -h 360 -fps 24 -b 6000000 -o - | gst-launch-1.0 -e -vvvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=192.168.0.22 port=9000

      3702263792?profile=original

    • Once I've resolved my putty error message: 'network error: software caused connection abort', I'll load dronekit onto my Raspberry and connect it to a pixhawk and try and see whether I can get it to work with Tower + video . Sounds like you've already been there though.

    • Yes you can run udp video and udp telemetry on tower on android. You needed tower beta previously but the latest tower let's you do it. Just need to configure the correct video and telemetry ports correctly in tower. I just the defaults
    • @Jon,  Yes this is possible.   I wrote a blog using the M5 removed from its case. However, my experience is that the performance of some other high-power USB WiFi dongles is just as good as the M5, so I use the USB method instead now.

    • @Patrick, I have previously read your blogs and they are full of great information. I think the one you refer to is where you have the M5 on the the craft and M5 on the ground. The set up I'm thinking about is where I have the camera, Raspberry Zero & usb wifi dongle on the craft and M5 on the ground. I've just got it all working with a windows laptop (using a Pi2 with the camera).

      I got your Gstreamer HUD via the android Play store some time ago and I was wondering whether I could connect the Nano M5 to a Raspberry P3 via ethernet and connect an android tablet to the Raspberry P3 either by usb cable or usb wifi. Possibly using the OpenWRT unless there is a better solution.I was hoping to avoid lugging a heavy laptop with me in the field.

    • @Jon,  Your description is close to what I have, but I use a PC on the ground connected to the Nano M5, and I run the HUD on Windows instead of Android, but it's the same idea.  

      You don't need the raspberry pi on the ground if you have an Android device.  You can connect wirelessly  to the Nano with your phone or tablet, and run the HUD on your device.  Set your phone or tablet to have a static IP, and then on the UAV send the UDP stream to that IP address.   I have tested this and it works fine.  I don't usually use Android because my FPV goggles need an HDMI port, so I use windows, and connect the goggles to the HDMI port on the PC.  But if you are using a phone or tablet, no need for the HDMI port.

    • @Patrick, Thank you Patrick that's great info.

      Due to my very limited knowledge on this area I'm a little bit confused. I can see with the laptop connected to the nano M5 via ethernet, that the signal goes through the Nano M5 and I'm quite happy with that.

      I'm not clear on why the signal from the Raspberry usb wifi will not go straight to the phone rather than the Nano M5. Or is it the case that with the signal being weak the Nano M5 will pick it up and the phone pulls the signal from the M5?

    • @Jon,  It's possible to connect the UAV directly to a phone or tablet, but the tablet needs to have the WiFi adapter in 'access point' mode.   

      The biggest drawback is the range you will get with the phone or tablet. Very limited. The M5 has a much better antenna and high gain.  I have achieved miles with a tracker and the Nano M5, but only a couple hundred yards with an ordinary WiFi receiver. 

      Since the M5 is already an 'Access Point' you can connect any device, and since it will route traffic on the local subnet, you can send data to any device connected to the M5.  To make this work, connect your tablet to the M5, just like you are connecting your UAV, but assign a static IP.  In Android, you can do this in the WiFi settings.

      Then on the UAV, setup your video stream to use UDP, and specify the IP address of your Android device.  In this configuration you will have two devices connected to the M5's WiFi.     You will still need to power the M5 over the ethernet cable, but you don't actually need to have the ethernet connected to any computer.  It would be used for power alone in this case, or if you want to also have the data going to a PC, you can connect the ethernet cable from the M5 to the PC.

      Let me know if this makes sense to you.

This reply was deleted.