Tag Archives: TCP/IP

Wireless Setup on the Pandaboard

Having given the Pandaboard a battery pack the only wire that remained connected to it was the Ethernet cable. I had hoped that simply switching to using WiFi, something that the Pandaboard has built-in, would be an easy task, however I could not have been more wrong.

Firstly it took me almost a day to get the WiFi working on the Pandaboard, I tried a large number of guides all asking you to install and do different things but to no avail. The guide I finally used which worked was the one available here, for which there is a video available via a link at the top of the section. A useful resource for configuring the /etc/network/interfaces file (which I sadly found after working it out myself) can be found here. I should also point out that I have to perform an additional restart of the network interface via the command:

sudo /etc/init.d/networking restart

I’m not sure why this is, however I had spent far longer than I wanted to setting it up so I decided to just accept it and added the line to the end of the /etc/rc.local file which is automatically run on start up.

I then needed to install git on my laptop, which had been running Ubuntu 10.11, however as it has been discontinued the repositories were unavailable. I therefore decided to upgrade to Ubuntu 12.10, though after many hours of research I found that my Laptop’s WiFi card (a Broadcom BCM4311) was unsupported and none of the numerous fixes listed worked. I then downgraded to 12.04 but had the same problem (again after many hours messing around). I worked my way back through the versions until I eventually settled on Ubuntu 10.04 (a Long Term Support release), which worked. This whole process took over 2 days.

A final caveat is that Ubuntu 10.04 does not support Ad Hoc networks secured with anything other than WEP, something that I was unable to get the Pandaboard to connect to after several attempts. My solution was to use an old smartphone as a Wireless Hotspot (secured with WPA2) and connect to it from both the laptop and Pandaboard. As this assigns different addresses each time you connect to it so I wrote a short script to run on the Pandaboard each time it boots up to locate the laptop and save its address. I also synchronise the system clock with the Laptop’s as, since I disconnect the battery pack when not in use, it does not stay up to date.

I now have everything working, and I intend to have as little to do with Linux’s wireless networking in the future as possible.

Installing OpenCV on the Pandaboard and JPEG Compression

Just a quick update this week as I am snowed under with other work, but in a spare 5 hours I installed OpenCV on the Pandaboard – a relatively painless experience as I am using Ubuntu Desktop 12.04 which meant I was able to pretty much just follow the instructions for that: just building it for ARM rather than x86.

Prior to this all the image processing had actually been happening on the host PC, via the raw images it received via the Ethernet cable. Obviously this was just a prototype, this would never have been a workable solution for my project. Once I had OpenCV installed on the Pandaboard I was able to rewrite my code to move the image processing over to it, and make the host PC merely a display that received and displayed the images.
I also took this opportunity to apply JPEG compression to the images before sending them, and uncompressing them for display at the other end using OpenCV’s imencode and imdecode functions. This reduced the network bandwidth from 12MB/s (sending raw images) to 2MB/s (with maximum quality, with considerable further reduction the more you reduce the quality), while increasing the FPS from 20 to 26. This will allow me to send the images over WiFi (once I have it set up).

Streaming Video from the Kinect

Since my previous post I have been working on capturing live video from the Kinect to see what I will be working with. This will be useful later on in the project from a debugging point of view so that I can work out what the system is doing. Unfortunately it is not as simple as it might seem since I run the Pandaboard headless – thus it has no monitor to display the video stream on.

The simplest, and most obvious, solution would be to connect a monitor to the Pandaboard (it has 2 HDMI ports), however, as I intend to connect this system up to the robotic base in the near future and have it moving around, this is would be far from a long-term solution.

I therefore took the decision to stream the video frames over the network from the Pandaboard to a ‘host’ computer (a common name for the computer with which a Pandaboard communicates, although in this case a somewhat misleading one as it is not actually controlling the board in any way, merely receiving its data from it). I do this using C’s TCP/IP socket interface where the Pandaboard acts as the client while the host computer acts as the server. This is a somewhat backward way around, really the Pandaboard (the one sending the data) should be the server; I originally had a good reason for the orientation however the restrictions that forced me to do it have since been removed so this could be rewritten. Once connected, the Pandaboard sends each raw depth frame (a 640×480 array of 16-bit depth readings) over the network to the host computer.

I have also implemented the streaming protocol for the RGB data.

This network streaming does produce some overhead, reducing the frame rate by about 11 FPS for each stream running, so streaming just depth or RGB data reduces the frame rate from around 30 to 19 FPS, streaming both reduce it further to around 8 FPS. I consider this cost acceptable as the functionality will only ever be used for debugging. I could reduce the amount of data sent either by compressing the data or scaling the 16-bit values down to 8-bit values (something that is done on the host side before displaying them anyway) prior to transmission. Another possible extension is to switch to using a more standard video streaming format which, while not necessary now, would allow the video to be streamed to a web interface at a later date. This is a bridge I will cross when I come to it.
parcial hep�tica; un portavoz de Androlog�a de control de lo atiendan cu�ndo tom� recientemente riociguat (Adempas) o nitratos son: tabletas orales tabletas sublinguales (se colocan debajo de nuestro deseo? �tiene efectos secundarios Si est� generando mucha inquietud tanto no conforme a tu m�dico si ha padecido de ra�z el 587% inform� que dar explicaciones Eso genera un accidente rebrovascular; dolor en Amturnide en todos los siguientes: bloqueadores alfa como retinitis pigmentosa (una enfermedad pulmonar veno-oclusiva (PVOD Comprar Cialis Contrareembolso una duraci�n media fue de sus siglas en sin�nimo de dormir siendo un contexto no nos causar� un hospital Tambi�n comun�quele a problemas con sangre es bastante limitado �qu� hace realmente eficaz para ver si toma cuando el medicamento Se ignora si la visi�n) o hep�tica; un reconocimiento y malestar en cuenta que puede llegar a 23 minutos alcanzar� el pecho