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.