phrack / shootoff-legacy Goto Github PK
View Code? Open in Web Editor NEWAn open source framework to enhance laser dry fire training.
License: BSD 4-Clause "Original" or "Old" License
An open source framework to enhance laser dry fire training.
License: BSD 4-Clause "Original" or "Old" License
Some trainers, such as SIRT, use a distinct laser color with semantics that should not be interpretted as a shot.
Current set to 600x600, should be 600x480.
The shot timer starts as soon as the first shot is detected and is cleared when clear_shots is called.
The shot that is selected has a colored border.
The color of selected shots/regions/targets has changed because white doesn't work for the white background most targets have, thus making the border for shots that missed basically impossible to see.
This should probably be a feature that is only on in debug mode. Holding one hotkey and clicking should simulate red shots and holding another hotkey and clicking should simulate green shots.
This idea was envisioned and incorporated by MisterOuchie in phrack/ShootOFF#46.
This is because PIL images are in RGB and OpenCV reads frames in BGR. The conversion from BGR to RGB is currently not happening, which causes red to be interpretted as blue and visa versa. This needs to be fixed both for the webcam feed and for the image handed to the target editor.
It works fine everywhere on Linux, but on Windows ovals are not transparent. The translucence is the result of applying stippling to shapes on the Tkinter canvas. Other shapes appear correctly.
This would make it so that scores are tracked based on laser color instead of being overall.
The standard github repository page and wiki can be less than friendly when attempting to tell non-technical people about the project. We need a github page that is very simple to get the point about what ShootOFF is across:
https://help.github.com/categories/20/articles
We can just link to various repo pages (e.g. the wiki and releases page) for specific information.
For example, "Shoot for Score" should be able to use the laser color to keep track of score per laser color instead of overall.
Opening up the preferences or target editor with two monitors does not open up the window centered on its parent (the main ShootOFF window).
We agree. All of the ShootOFF contributors at this point are scientists and engineers that would rather be doing math or coding. If you can do better, we'd appreciate it. A contribution should come in the form of a vector graphic with PNG outputs in at least 32x32, 48x48, 128x128, and 256x256. If there are other sizes you'd like to include for other window managers, we'll take 'em! Feel free to license your icon under any open source compatible license you like, we'll include the license with ShootOFF.
Same for YouTube videos!
For example, the shoot for score protocol should show the score for a shot.
This should also cover removing training protocol specific information on the reset method of the protocol.
This is a bit of a PITA.
To complete this feature, the following needs to be done:
Add a shot timer that shows the shot time per laser color even if a training protocol is not on.
Click to simulate shot in debug mode.
Drawing arbitrary polygons (error if temp polygon isn't valid).
Saving the feed. (On any OS, you can only save as an EPS unless ghostscript is installed, download: http://www.ghostscript.com/download/gsdnld.html -- add to path on Windows)
Selected shot is now solid gold.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1470, in call
return self.func(_args)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 531, in callit
func(args)
File "shootoff.py", line 118, in detect_shots
self.process_hit(new_shot)
File "shootoff.py", line 162, in process_hit
self.loaded_training.hit_listener(region, tags)
File "training_protocols\random_shoot__init.py", line 65, in hit_listener
if tags["subtarget"] == self._subtarget_chain[self._subtarget_index]:
KeyError: 'subtarget'
Should get the time stamp for the current shot and the previous shot.
See title.
This would both help people who are trying to report a bug and also allow users to save an image of particular session where they did well and wanted to keep a snapshot of the shots, targets, and feed.
Should rename it to package.spec.
Should add a virtual circle for each circle on the target and add tags to each to give them subtarget names.
Need to detect the color of the laser and adjust the shot marker color appropriately. The camera will have to be configured properly to be able to detect the color (contrast is usually quite off). If the color cannot be detected it will be assumed that it's interference.
Phrack does not own a Mac. Please contribute this if you are capable of doing so! Instructions for making a package are here:
https://github.com/phrack/ShootOFF/wiki/Making-a-ShootOFF-Package
Shot detection does not currently run as often as the user configures because it is actually run at rate = configured time + run time of the algorithm.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1470, in call
return self.func(*args)
File "C:\Users\Michael\Documents\ShootOFF\ShootOFF-github\target_editor.py", l
ine 69, in send_backward
self.reverse_regions(above, self._selected_region)
File "C:\Users\Michael\Documents\ShootOFF\ShootOFF-github\target_editor.py", l
ine 72, in reverse_regions
r1 = self._regions.index(region1[0])
ValueError: 1 is not in list
Idea:
Need a better color for selected targets.
Shot detection is currently running once every 30 ms. A user using the SIRT trainer has noted their shots are being marked multiple times.
LaserLyte notes that their trainers stay on for 100 ms at every trigger pull: "The Laser Trainer Cartridge activates for 100 milliseconds each time the firing pin strikes the cartridge."
http://www.laserlyte.com/products/trainer-lt-380
This would cause LaserLyte shots to be marked up to 3 times each.
This is what the makers of SIRT had to say after emailing them, "The SIRT Training Pistol uses a "constant on" laser that remains illuminated as long as the trigger is depressed (shot broken)."
We do not currently have data for how long Laser Ammo.
Probably averaging too big of a circle when detecting the color. Will try making it smaller.
Training protocol passes in a target name and gets back the coords of the target's centroid.
Use case talked about here: phrack/ShootOFF#46 (comment)
This should offer two modes:
LARGEST_REGION should be the default.
-Selected targets/regions are now outlined in white
-Transparency for ovals only works when running on Windows on the webcam feed, always fine on other OSes
-CLI/GUI for configuring ignored laser color
-Play sound no longer a what-if
Common questions so far:
This would mean realizing play sound from here: https://github.com/phrack/ShootOFF/wiki/Tag-Semantics.
Need to fix the z-order.
This would allow users to create regions of shapes that aren't currently supported as long as the shapes represent regular polygons with only straight lines as edges (e.g. IDPA/USPSA targets).
In this mode, each click should add a vertex to the shape that is being drawn and a line should be drawn between the current vertex and the last vertex that was added. The vertex and line should be simulated until the user clicks. Right clicking in this mode should reset the drawing mode and make the shape that was being drawn a solid region. Hitting ctrl+z should remove the last vertex. If there are less than 3 vertexes, an error should be shown and the shape should be deleted.
The current algorithm doesn't let a subtarget be repeated for a given string. It should be possible to do something like "shoot 1, shoot 2, shoot 5, shoot 5, ...".
Update the spec to use an icon.
Should add GUI and command line configuration options for:
This would give the GUI a less ugly, more native look.
Needs install instructions for Linux/Mac (already there on Windows). Pip required file needs to be updated too.
Right now it's changing the meta data correctly, but doesn't change the size on the canvas. This matter if a training protocol wants to highlight a shot by making it bigger for some reason.
If you have a ton of shots in place you can't see an older shot that is buried under the others. The selected shot should be moved to the top of the z-stack.
This depends on the platform and version, but it can be eliminated by ensuring the tts engine is actually in a loop (thanks MisterOuchie for finding and fixing this via phrack/ShootOFF#46).
They get this now via the command line, but that doesn't help people using the Windows package who are launching shootoff from explorer by double clicking the exe. For the latter, it fails silently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.