Companion: Pi 2/3/Zero

Technical, Code and Hardware questions

If you are having issues with Companion: Pi 2/3/Zero development, and would like to discuss code solutions please post your topics here so other developers can assist and provide ideas. Afterall Companion: Pi 2/3/Zero is a new project with a finished idea - it is being developed with project goals that have yet to be implemented.

Basic project chat here:

Github repository here:

Best wishes and good luck with your adventure!

1 Like

Iā€™m building a github for my experiments: GitHub - benb0jangles/Companion-Pi: This is a collection of Linux .img files to allow drone/automated vehicle users to hook up to a Raspberry Pi 2/3/Zero V1.2/1.3 and further their drone/automated vehicle experiences in various ways. All software is provided as-is and you assume all risks by using it.
Latest Release: APMpi_Jessie_Lite_V1_0.img:
Download Link: Google Drive: Sign-in
Info: https://github.com/benb0jangles/Companion-Pi/tree/master/APMPi%20imā€¦
Release: APMpi2.img V1_0:
Download Link: https://drive.google.com/file/d/0B1cVb3uX0f0dU2NPcm9DUGZaN0E/view?uā€¦
Info: https://github.com/benb0jangles/Companion-Pi/tree/master/APMPi%20imā€¦
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: Companion: Pi 2/3/Zero
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.

http://diydrones.com/group/companion_computers/forum/attachment/download?id=705844%3AUploadedFile%3A2263032

Woop! we have a pi Zero V1.3 working on Jessie Lite. Camera & Mavproxy working.

Download Link: https://drive.google.com/open?id=0B1cVb3uX0f0dWE92R291eV9ldTA

APMpi_Jessie_Lite_V1_0 - Tested on Pi Zero V1.3 - Also (probably) working for pi2/3 by Benbojangles (27/05/2016)

  • This .img file is V1 of a project I am working on. It is available under creative Commons License.
  • This .img file is a custom raspbian image created for the Raspberry pi, it includes:
  • Raspbian Jessie Lite (version from 24/05/2016)
  • Gstreamer
  • Mavproxy
  • SSH Enabled
  • Pi Camera enabled
  • Disabled O/S control of Serial port
  • Custom config.txt for performance
  • Static IP enabled
    File fits on 8gb sd card, and has 70% free space. Also fits on larger sd card (you can expand filesystem if wish to)

How to burn to SD card:

  • 1)Burn .img to sd card using win32diskimager.exe

  • 2)Boot pi Zero

  • 3)Jessie Lite is Command Line, so you plug in monitor & keyboard to setup wifi for ssh

  • 4)Connect to your wifi by typing in & then editing: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

  • 4)Guide here: https://thepihut.com/blogs/raspberry-pi-tutorials/83502916-how-to-sā€¦

  • 5)Input your wifi SSID & Password, then writeout file by + o, then exit by shift + x.

  • 6)Check you IP, type: ifconfig. it should show as 192.168.1.3 (remember for ssh connection)

  • 7)Shutdown pi 2/3/Zero and unplug keyboard/mouse/screen, restart pi 2/3/Zero

  • 8)SSH connect: 192.168.1.3 port:22 - username:pi password:raspberry

  • 9)run mavproxy & gstreamer with settings as you wish (or use my settings)

  • I hope to add more features in future once the groundpi 2/3/Zero is complete, there will not be a need to setup IP.

  • Thanks, suggestions/future .img versions to i6mods@gmail.com

Some software that is coming along with integrated video HUD:

As of today:
-Mission Planner has a modified version of software for video, I hope it gets integrated into the standard HUD soon
-Tower Beta has integrated video HUD which is nice :slight_smile:
-APM Planner video HUD is in development I believe
You can of course run gstreamer as a stand alone software on Windows/Mac/Linux if you wish, but it will be better to integrate into a flight system.

Super tiny pi camera mount

APMpi2.img V1_0:
Download Link: https://drive.google.com/file/d/0B1cVb3uX0f0dU2NPcm9DUGZaN0E/view?usp=sharing

Info: https://github.com/benb0jangles/Companion-Pi/tree/master/APMPi%20img%20files/APMPi2_V1_0
//--------------------------------------------------------------------------------------------------------------------------------------------------------------//

APMpi2.img V1_0 by Benbojangles (06/05/2016)

  • This .img file is V1 of a project I am working on. It is available under creative Commons License.

  • This .img file is a custom raspbian image created for the Raspberry pi 2, it includes:

  • Raspbian Jessie

  • Gstreamer

  • Mavproxy

  • SSH Enabled

  • Pi Camera enabled

  • Disabled O/S control of Serial port

  • Custom config.txt for performance

  • Static IP enabled

How to burn to SD card: -

1)Burn .img to sd card using win32diskimager.exe -
2)Boot pi2 -
3)Connect to your wifi network to aquire ip address -
4)Shutdown pi2 and unplug keyboard/mouse/screen, restart pi2 -
4)SSH connect: 192.168.1.3 port:22 - username:pi password:raspberry -
5)run mavproxy & gstreamer with settings as you wish (or use my settings) -

I hope to add more features in future once the groundpi2 is complete, there will not be a need to setup IP. -

Thanks, suggestions/future .img versions to i6mods@gmail.com

Hi,
Iimage ā€œAPMpi_Jessie_Lite_V1_0.imgā€ works in Realtime?

Regards

Hi
Iā€™m after a little bit of help please.
Iā€™m trying to understand how to set up port forwarding on a raspberry Pi - wlan0 to wlan1. Iā€™ve googled port forwarding/raspberry and end up with info on how to configure routers and connect with a raspberry pi. I would appreciate if someone would point me in the right direction.

What Iā€™m trying to do is have a Sony QX100 camera stream liveview/control data to a raspberry on wlan0 then forward via wlan1 on 5.8Ghz to a Ubiquiti Nano M5 acting as an access point. The Ubiquiti is connected to my laptop via ethernet.

I currently have pysony ā€˜https://github.com/Bloodevil/sony_camera_apiā€™ working on my laptop via an Ubiquiti Loco M2 which links to my sony Qx100 . With pysony I have access to all the camera controls and view liveview via Patrick Duffyā€™s HUD via Bluestacks. Unfortunately this current setup only gives me approx 140yds using 100mW total output power.
Thanks

For some reason, on my Jetson TK1 (Ubuntu) - canā€™t get UDP stream displayed on there. I tested on my Ubuntu Laptop as comparison, and it streams just nice. So I guess itā€™s the Jetson thatā€™s the issue.

So far my results with gstreamer are (Systems as UDP receivers/Clients):
Successful:
Windows (x86/x64)
Ubuntu Laptop (14.04)
Android (Both Tower & QTgstreamerHUD)
Pi2 with Jessie Lite (hdmi to HD FPV goggles)

Unsuccessful:
Jetson TK1 (Ubuntu)
Pi2 with Jessie Lite (hdmi to HD FPV goggles) (Now working see newer posts)

Iā€™m really trying to get a Pi2 or Zero client working for my goggles, just for proof of concept.

The issue with Pi2/Zero as Client/Receiver is that OMXplayer prints command line ā€œhave a nice day ;)ā€ and back to command prompt. Using standard gstreamer UDP client pipeline code does not open a video window either. Maybe itā€™s Jessie Lite as it lacks desktop environment? So I will try Full Raspbian, then Ubuntu mateā€¦

Some good results Iā€™m getting on the whole, really happy.

Iā€™m comfortably using a Pi Zero 1.3 as the camera feed/server with no issues whatsoever on any system.

Iā€™m using a pocket/dongle wifi router for ssh connections and video feeds between client + server. Works really well, and Iā€™m enjoying the customisation of the router. Unfortunately Openwrt isnā€™t yet built/compiled for Pi Zero, so Pi2 is the way for Openwrt router.

Iā€™m going to try pi zero 1.3/Pi2 with Full Raspbian or Ubuntu mate to see if those work on my goggles soon, fingers crossed, advice and experiences please.

For port forwarding, Iā€™ve been looking at Pi2 as a router using Openwrt (only for pi2, not available for pi zero).

Could you send Sony QX100 to Pi2 (as openwrt router), then router 5.8ghz to Ubiquiti 5.8ghz?

Yes in real time, both video and telemetry (when wired to APM/Pixhawk serial connection) :slight_smile:

Tiny 3-axis pi camera gimbal in my headā€¦ 3D printed mount parts, hollow shaft motors (EMax 1806 450KV 20g each).
Potential to be 80g 3-axis gimbal including 1080p/4k camera.

Time for concept ideasā€¦

Pi to Pi UDP streaming (1280x800px to HDMI goggles):

Video:

Telemetry HUD overlay next? Anyone capable of making HUD for Linux?

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.

hi, it sounds like youā€™re having trouble with mavproxy. Most people have it running smoothly with apm 2.6 and once wired correctly, it should display data in ssh.

Regarding the Raspberry Pi 3 as a companion computer, what is the most current, correct way to set it up using the WiFi chip on the board?

I already stepped through this, but I didnā€™t get there: https://pixhawk.org/peripherals/onboard_computers/access_point
That was after I cloned the Git Repository and installed mavproxy.

I know there there is a tutorial to install it this way: http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html and then this: http://ardupilot.org/dev/docs/making-a-mavlink-wifi-bridge-using-the-raspberry-pi.html I was planning on wiping my SD card and starting over and trying it this way.

Basically I need a little guide on which tutorials to follow to set up the Pixhawk->RPi3->Wifi->GCS connection.

benbojangles do you have your scripts available anywhere? They donā€™t appear to be on git. Iā€™m having trouble getting a reliable stream from rPi 3 to rPi 2 using Pi cam with gstreamer over UDP. I can get a good fast video stream when receiving on Windows with gStreamer, but receiving on Pi isnā€™t as successful. Maybe something wrong with my version of Jessie and gstreamer.

Could you post your Tx and Tx pipelines?

Thanks, Glen