Bull's Eye - Never miss a shot
Idea: Track a dart in realtime and move bullseye to the calculated target of the dart. Therefore dart will always hit the center!
Two dynamic vision sensors (DVS) or two embedded dynamic vision sensors (eDVS) connected with a cable to sync microtimestamp
python2 ./python-scripts/edvs-tracker-3D.py
- Install jAER using SVN checkout from https://svn.code.sf.net/p/jaer/code/jAER/trunk/
- Run trunk/jAER/jAER.sh
- Connect two DVS Cameras to your computer
- Maybe setup USB on Linux to recognize cameras (check https://sourceforge.net/p/jaer/wiki/)
- Connect the two DVS Cameras usinga sync cable (check http://siliconretina.ini.uzh.ch/wiki/doku.php?id=userguide#dvs128_camera_synchronization): No need to connect GND, because USB is on same computer
Quote form: http://siliconretina.ini.uzh.ch/wiki/doku.php?id=userguide#dvs128_camera_synchronization)
DVS128 Camera synchronization
Multiple cameras can be synchronized to microsecond time-stamp precision. To connect cameras, you can use coax cables together with t-connectors and the Pomona Electronics 5069 coax breakout adaptor with 0.025” pin connectors (e.g. http://www.digikey.com/product-search/en?x=-1075&y=-87&lang=en&site=us&KeyWords=pomona+5069 or http://www.testpath.com/Items/Breakout-BNC-Female-to-0025-in-Square-Pin-Sockets-113-531.htm).
The DVS128 cameras can be precisely synchronized so that simultaneous events from two cameras will receive exactly the same timestamps. The camera have the capability that one camera can be the master timestamp source which clocks the the other's timestamp counter.
For synchronization, DVS128 cameras with a firmware version number >= 11 should be used, older firmware versions are not synchronized properly if the USB load is high. To enable this functionality, the cameras must be connected so that the OUT of the master is connected to the IN of the slave(s). If the cameras are connected to the same computer, the ground pins do not have to be connected (to avoid possible ground loops). If the cameras are connected to different computers, the ground pins should be connected as shown below.
Starting from firmware version 11, the timestamp master camera has to be selected in software. In the jAER software, for the timestamp master (where the OUT is connected) the checkbox 'Timestamp master / enable sync event output' in the DVS128-menu has to be checked, for the slave(s), this checkbox has to be unchecked.
The master camera keeps its bottom LED lit, while the slaves extinguish theirs.
To synchronize the cameras after plugging them in, press '0' in the AEViewer window of the timestamp master to reset the timestamps of all the cameras.
(next steps continue here:)
- open jAER Instance, choose one Camera from the menu
- open a new jAER viewer, form menu -> new viewer
- select second camera in new viewer
- set synchronization in master camera to master
- uncheck "master" on slave camera menu
- go to master window and press "0" (zero) to reset the sync timer: Now the status field on the bottom of the screen should say, that the timer was successfully reset
- Start recording on both windows
- Throw a dart so both cameras can see it (camera should be setup like described in the section below)
- Stop recording and store files
- Edit ./python-scripts/edvs-tracker-3D.py and change `datafile = 'pathtofilename1.aedat' and datfile2 = 'pathtofilename2.aedat'
- run
run python2 ./python-scripts/edvs-tracker-3D.py
- to pause visualisation, click in image, to continue click again
- you should finally see the estimated flight curve and target
We used this sketch to setup our cameras. In an advanced version the software shoudl autocalibrate the cameras.
The shown example can track the dart, but is still not accurate enough. Additionally, it seems to be possible to track the dart fast enough for realtime shots. This project can be used as basis to develop an advanced realtime tracking mechanism including software calibration, e.g. on an embedded platfrom.
This project was part of a class work at Technical University of Munich (TUM), and in the subfolder presentation
you can find further information)
- Presentation PDF
- Report PDF
- Neural Engineering: Implants, Interfaces and Algorithms SS2015 (check class website at TUM)
The 3D curve was fitted from 3 graphs (x,y,z over time), which were used to calculate the velocity in x,y and z direction to estimate the target