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.


2 comments:

  1. Does this code download & save only one image(photo) to the disk? How to download other images in the jumping sumo? Help would be much appreciated.

    ReplyDelete
    Replies
    1. Hi, Pari, yes, it only downloads one image at a time.

      As far as I know you connect via FTP on port 21 to get all saved images, I can't remember which folder they are in but I think it's under /data.

      Cheers,
      Robert

      Delete