This is a sample code just for fun: enjoy !
For now, the sumo's behavior is very simple:
- when the user gets close (big face on the camera), the robot goes backward
- when the user gets too far (small face on the camera), the robot goes forward
- when the user moves sideways, the robot turns accordingly.
The user face coordinate is computed through Angus.ai "face_detection" API.
You need a computer with two interfaces with one wifi (at least).
JumpingSumo <===Wifi(LAN)===> Computer (wrapper.py) <===Ethernet(WAN)===> Angus.ai
After trying to bind ARDroneSDK3 in python (epic fail), I just "wrap" the executable with python subprocess.Popen
and I simulate keystrokes by communicating to the process through stdin
pipe for commands and use the fifo for video streaming.
Download and install ARDoneSDK3:
- Go to https://github.com/ARDroneSDK3/ARSDKBuildUtils
- Follow the instructions
Compile the driver:
$ git clone https://github.com/angus-ai/angus-jumpingsumo.git $ cd angus-jumpingsumo $ make
Prepare the environment:
$ cd angus-jumpingsumo $ virtualenv env $ source env/bin/activate $ pip install angus-sdk-python
Run:
- Connect your jumping sumo to your computer
- execute
./wrapper.py
Now a docker container is available in order to simplify compilation dependencies and running.
Install docker (https://docs.docker.com/installation/ubuntulinux/)
Clone sources:
$ git clone https://github.com/angus-ai/angus-jumpingsumo.git
Goto in directory:
$ cd angus-jumpingsumo
Build the image:
$ docker build -t sumo:test1 .
Run the container:
$ docker run -p 43212:43212/udp -p 43212:43212 -p 54321:54321 -p 54321:54321/udp -i -t sumo:test1
You can discuss Angus SDK on the Angus SDK developer mailing list, and report bugs on the GitHub issue tracker.
This web site and all documentation is licensed under Creative Commons 3.0.
Angus Python SDK is Angus.ai open source technologies It is available under the Apache License, Version 2.0.. Please read LICENSE and NOTICE files for more information.
Copyright 2015, Angus.ai