Sunday, November 8, 2015

Side project time: DNS Twister

Recently I came across a really awesome Python tool called dnstwist. In the author's words, dnstwist is a "Domain name permutation engine for detecting typo squatting, phishing and corporate espionage".

At its core dnstwist creates permutations of domain names and checks to see if they are registered. It also does a ton of other cool things like GeoIP mapping to resolved IP addresses.

As I am sure there are people who would like to use dnstwist but don't have Python installed, I have (after a weekend's re-familiarisation with Google App Engine) created DNS Twister!

It may look rough as **** but it works, presenting the core dnstwist functionality via a web application.

The source code is on GitHub of course.

Sunday, October 25, 2015

Docking/charging system overview

As a follow-up to yesterday's post, here's another of my excellent terrible Visio diagrams, showing how the different bits of software will work together on the RPi:

Click to see in all it's glory

The SumoProxy component is effectively complete and the Web Interface component allows viewing the FPV camera but doesn't offer any control. SumoPy and the docking code "work", but not yet in the manner shown.

Saturday, October 24, 2015

Sumo-charge update

Thanks to a super-long-weekend my Parrot Jumping Sumo wireless charging project has been making good progress.

The current design has the Raspberry Pi "proxy" the Jumping Sumo, teeing off the data passing between the controller (iPad/phone/etc) and the Sumo.

There is a basic web interface where the user can view the FPV video, and (soon) enable the automated docking sequence. The web interface runs off a flask web server which can parse the video data and will inject controls back into the stream.

I expect I'll switch to web-only control once I've proved the web interface can perform on the Raspberry Pi.

SumoPy and SumoProxy
Two components of this project are available separately via these repositories if you want a play: SumoPy, SumoProxy.

Sunday, October 18, 2015

Faster barcode tracking

Leveraging the work done to speed up both video capture and motor control, here's a significantly faster tracking example:

On board it looks like this:


The first photo taken by properly scraping the video stream.

Capturing Parrot Jumping Sumo video packets in Python's UDPServer

One of the key goals of my sumo-charge project has been to have the Sumo auto-dock by driving towards a "landmark" (a barcode in my case).

To do this I obviously need access to the video stream from the Sumo. The video UDP packets are the same format as the rest of the response data, but for some reason I was not receiving them using Python's UDPServer.

After much flailing around on Google I fired up Wireshark and discovered those packets were being sent still, so it was definitely a problem with my UDP server. Digging deeper (thanks, stack overflow) I discovered that the maximum packet size in UDPServer was hard-coded to less than the size of the video packets.

The size of the video packets sent by the Sumo is established in the reply during the initialisation handshake to TCP port 44444, in the 'arstream_fragment_size' field (65000 in this instance):

To receive the video packets you need to update your UDPServer instance's 'max_packet_size' with the same value:

Monday, September 21, 2015

QR tracking using the Parrot Jumping Sumo camera

Nested QR code with the Sumo's wheels against the monitor.
To implement "auto-docking" I am intending to use a 7x7cm square nested QR code target and the Sumo's FPV camera. The QR nesting allows detection and recognition at distances up to 50cm whilst remaining accurate right up the moment of touching the docking station. The pictures shown here are actual snapshots from my Jumping Sumo's FPV camera (640x480 resolution).

Same QR code image at an approx range of 30cm from the monitor.
I've prototyped some detection code using an install of the python-qrtools package on the Raspberry Pi:

This code successfully recognises the two QR codes in these test images, though it takes about half a second to do so.

Next up, a docking control loop!