Showing posts with label sumo. Show all posts
Showing posts with label sumo. Show all posts

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:


Success!

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!

Saturday, September 19, 2015

Capturing photos from a Parrot Jumping Sumo using Python

Success!

After a slightly faulty first effort I have successfully taken a photo from my Jumping Sumo using Python's telnetlib module.

In the following code the built-in yavta tool is used to push (and buffer) a snapshot from the camera to /dev/stdout and then base64 is used to push an encoded version of /dev/stdout back to the Python client where it is decoded and saved to disk. As before I have to kill the dragon-prog process to gain access to the camera.

There are a number of alternative image capture routes using yavta, e.g. saving the file to the Sumo's flash or a ram disk and using FTP to recover it. This one seems to be the quickest (and simplest) for now and will suffice for the purposes of identifying and homing in on the charging station.


Monday, September 14, 2015

(Almost) taking snapshots over telnet on a Parrot Jumping Sumo

As part of the my attempts to set up inductive charging on a Parrot Jumping Sumo I am looking at some form of "docking" control where when the robot is close to the charging station it attempts to self-dock, using the camera and some sort of marker on the charging station.

To do this I'm going to need to access the video feed and before I go down the path of setting up the full Parrot SDK I thought I'd have a poke around the Sumo's Linux OS internals.

It turns out that the Sumo has yavta - aka "Yet Another V4L2 Test Application".

So, after telnetting to the Sumo on 192.168.2.1 I first needed to stop the Sumo process that was accessing the camera (disclaimer, this is the process that does "everything" that makes the Sumo work with your phone so you'll need to reboot to restore normal functionality):

kill `pidof dragon-prog`

Then I was able to take a snapshot using yavta:

yavta --capture=1 --file=/data/ftp/image.jpeg /dev/video0

To grab that image I simple FTP'd it from 192.168.2.1 - it's waiting in the root of the FTP file tree.

There's only one (not unsolvable, I hope) problem though - the frame wasn't fully captured so only the top couple of rows of pixels had valid data...







Saturday, August 29, 2015

Inductive charging installation test 2

(Warning, more tacky tunes)


I've tidied up the install significantly and switched the RFID tag to be on top of the robot. Previously it was at the front (to be close to the detection coil) but that was obscuring the charging coil and camera. Doing it this way also allows me to play with the balancing mode of the Jumping Sumo.

The charging appears to be very slow though so the next step will be to push the charging coil completely flush to the box to get the closest possible coupling.

Here's a close-up of the neater install (I've since routed the power supplies through a cable gland):


[Instagram] Onboard heading in to charge

Friday, August 28, 2015

RFID-triggered inductive charging a Parrot Jumping Sumo

It works (tacky YouTube music and all)!


Obviously the IKEA box will be replaced with something a little more visually-appealing (and with less masking tape), but the basic RFID detection and charging enablement control loop works perfectly. The code for the Raspberry Pi is on GitHub.

These are the basic components so far:


[Instagram] Wireless robot charging station mock up #maskingtape

Wednesday, August 19, 2015

[Instagram] Close up of the final wireless charging installation

Instagram posts

Using the magic of IFTTT I'm going to be automatically cross-posting any robot-related Instagram pics and videos here - stuff like this:


A video posted by Robert Wallhead (@thisreallyismyrobot) on

Sunday, July 19, 2015

Wireless charging for the Parrot Jumping Sumo


I've successfully managed to add a basic wireless charging system to my Parrot Jumping Sumo - this opens the door for self-propelled docking and charging - no human input needed. The module itself is from Little Bird Electronics.

The next step is a Pi with a docking dashboard for starting and stopping the charger, reporting on charge state etc. Below you can see it actually charging (indicated by the red LED in the top-right).

Wednesday, June 10, 2015

Parrot Jumping Sumo

My amazing wife bought me one of these for my Birthday and it is awesome!



That is all :)