After much chasing, and testing, I have found this to be an efficient way of getting low latency high quality HD video out of an Aircraft. The latency is around 0.4 seconds at worst which would be OK for an FPV with an APM doing the hard work.
I will continue to search for methods to drop the latency down further, but this is a lot better than the 6-12 seconds I was getting on my first attempts.
Any comment (with useful instructions) would be appreciated.
For the wireless link, I am using two UBIQUITY ROCKET M 900 with Australian ACMA approved firmware, at the base station, I am using a tracking (yet to built the tracker...) 1.5 meter long X and Y polarised Yagi, and on the plane, two RF Design flexible strip antennas, placed at right angles to each other.
but how you do that bit is up to you.....
the critical bit is getting the Raspberry Pi's to chat to each other.
I have tried to make this as user friendly as possible... good luck.
Setting up IP video for Raspberry Pi 1080p video (FPV)
You will need 2 B model Raspberry Pi's and 1 Pi Camera. (Element 14, or RS components)
Preparing your Raspberry Pi for first boot…
Follow the instructions at http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdf
Install the prepared SD card in the Pi and boot.
Setting up your Pi
Connect the Pi to your router with a network cable.
On Start-up it will resize the FAT partition and present you with a menu.
Set your language, and keyboard layout.
Select Raspbian… then click install.
After this has extracted (will take a while….) it will reboot into the configuration screen (again will take a while for this first boot.)
The important things to change here are
- Enable the camera
- In advance options…..
- Set the host name (camera, for the camera end, receiver, for the viewing end)
- Memory split, set the memory for the GPU to 256
- Enable SSH ( will come in handy later, as you may need to talk to the Pi in the air.....
Then finish and reboot.
First login
Username: pi
Password: raspberry
Setting up the required programs for video streaming
Install the dependencies by running the following in a terminal:
sudo apt-get install mplayer netcat
cd /opt/vc/src/hello_pi
make –C libs/ilclient
make –C libs/vgfont
cd /opt/vc/src/hello_pi/hello_video
make
cd ~
Now repeat this for the other Pi….
Streaming…
First set up the receiver….
Ensure the receiver is connected to your network and run
ifconfig
after you press enter, you can find your ip Address. Note this down.
Then run the following.
mkfifo buffer
nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer
the Pi will now wait for the feed.
On the Camera Pi
Ensure camera is connected to the Pi
Ensure Pi is connected to the network (you can confirm this with ifconfig)
(see instructions at http://www.raspberrypi.org/camera for how to connect the camera)
In the following command, replace the ip address with the one you just noted down.
raspivid -t 0 -fps 15 -o - | nc 192.168.1.85 5001
if all goes well you should be streaming 1080P video at 15fps with less than 0.5seconds of delay..
now add your wireless bridge between the two, and away you go J
This information has come from the Raspberry Pi foundation website, and other sources, tested and proven by myself..
Comments
Hi Phil
I do have 2.4GHz RC radio.
Can you confirm that you mean you can operate the 900MHz wifi link and 900MHz telemetry without problem.
What sort of range have you achieved with it?
I'm hoping to be able to go beyond LOS, so the telemetry is critical.
As far as telemetry, I haven't seen any issues with the 900's affecting each other, though the longer term plan is for the telemetry to also go over the wifi link.
Phil
I've been looking at setting this up. I've got the RPis streaming over my home wired network. Now I'm looking at a wireless bridge so I can get the camera Pi airborne. The local Ubiquiti dealer recommended a PicoStation M2 in the air and NanoStation M2 on the ground. That's 2.4GHz. Isn't that going to interfere with my RC radio?
I don't remember anyone mentioning any interference concerns in this post. This 2.4Ghz system is still going to interfere with my 2.4GHz RC radio isn't it?
The original post uses 900Mhz, but won't that interfere with the APM telemetry?
That leaves 5.8Ghz, (which I see is what Canberra UAV used in the OBC12).
They come from RFDesign.com.au. The UAV is at the office, I will post some pics when I am back from leave :)
Phil
might be some useful info in here too (?) -
You know what they say about how several years in the laboratory can often save an hour in the library.
All,
Has anyone tried the full setup (over wifi) on a flying quad/airplane to see how it handles variations in datarate/dropouts etc?
Please try and then post your results!! :)
Regards,
Saad
Will initially be a F450 quad just for close range / low altitude 'proof of concept' work.
If this is successful then progress to a larger machine such as UAP1 (quad or Y6).
If this successful then try for some longer range work with a fixed wing.
I think you solve this by running: modprobe ipv6
@Patrick and @Philip : I had exactly the same pb with gstreamer-1.0
It's why a used gstreamer 0.10 on Pi for publishing or receiveing
sudo apt-get install gstreamer-tools gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly
gst-inspect
normally : 233 plugins, 695 features
and it s work on Pi.
For those of you with experience with 'flying a pi and wifi' ... I'm interested in seeking advice on powering a pi while it is on the UAV. Also what is the expected duration of operation based on your set-up?
I have fitted one of these add-on boards to my pi as it will permit a variety of input voltages and most importantly has a fuse. I will be following the advice in this thread regards wifi components after I've proved the concept of my work with some short range flight testing.
I was intending on using a 2S battery in an attempt to keep the heat down but just wondering what other crew are doing with respect to power supply for Rpi and also duration of operation.
thanks,
MJ
-
9
-
10
-
11
-
12
-
13
of 21 Next