dzhoshkun / wherepy Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
N
measurements:
Simple tracking quality indicator similar to a wi-fi indicator
States:
The version should be used in #2 for keeping track of which version created a session log.
versioneer can help manage the version dynamically, compatible with most if not all installation types.
See esp. :
The info message is sometimes truncated:
(py2) ~/tmp/ wherepy-collector-cli -p 100 -o test
| Device | Signal | Error | Info |
---------------------------------------------------------------------------------
OFFLINE [ ] 0 % NA Could not connect (Could not detec
As per the discussion in dzhoshkun/ndicapi#14:
Then re-open PlusToolkit/ndicapi#13. After that:
On first launch WherePy should:
wherepy.home* = '$HOME/.wherepy/'
folderwherepy.sessions_default() = os.path.join(wherepy.home(), 'sessions')
foldersetup.py
000000-2018-02-17-08-49-13.yml
within root sessions folder => will be addressed part of the applicationSessionLog
class:
SessionLog(filepath)
:append(tool_pose)
:
tool_pose
=> YAML representationwherepy:
version: git-described
0:
port1:
quaternion: "q0 q1 q2 q3"
coordinates: "x y z"
error: e
quality: qu
timestamp: t0
1:
port1:
quaternion: "q0 q1 q2 q3"
coordinates: "x y z"
error: e
quality: qu
timestamp: t1
[...]
N:
port1:
quaternion: "q0 q1 q2 q3"
coordinates: "x y z"
error: e
quality: qu
timestamp: tN
tests
folderwherepy-collector-cli --num-measurements 20 --output-file point.yml
tests
(?) => #14setup.py
pyndicapi
setup.cfg
(only Python 2 ) => using python_requires
insteadwherepy-collector-gui [--session-folder /path/to/session/folder]
commandwherepy-collector-cli [--session-folder /path/to/session/folder]
command (?)wherepy.home*( = '$HOME/.wherepy/'
folder #10wherepy.sessions_default() = os.path.join(wherepy.home(), 'sessions')
folder #10os.path.join(wherepy.sessions_default, '2018-02-17-09-17-14-serial-no')
#11wherepy.io
package #2wherepy.track
package #3wherepy.gui
package #1wherepy.app
package with Collector
class
Collector(graphical=True)
(?)During the hands-on session yesterday the system was sometimes capturing quaternions as 'M', 'I', 'S', 'S'
, an artefact of parsing the transform
, which actually is nothing other than the word MISSING
.
Probably the best strategy is to parse the returned transform into a float
, and catch the ValueError
.
For development it'd be convenient to have a --dry-run
(-d
) option that will display dummy data.
os.path.join(wherepy.sessions_default, '2018-02-17-09-17-14-serial-no')
The lines I used to enable logging in https://github.com/dzhoshkun/wherepy/blob/master/wherepy/app/_collector.py#L6:
root = logging.getLogger()
root.setLevel(logging.DEBUG)
From https://stackoverflow.com/a/14058475/3956024
And I added the logging for each capture here: https://github.com/dzhoshkun/wherepy/blob/master/wherepy/app/_collector.py#L38
I'd PR, but you'll handle it more conveniently.
NdiTracker
or wherepy.track.ndi.Tracker
class, sub-class of Tracker
Something along these lines:
Signal: |>>>>>>>> | 85 %
Error: |<< | 1.35 mm
Edge cases:
Signal: | | 0 %
Error: |<<<<<<<<| infinity
print(u"\u221E")
Signal: |NO CONNECTION| 0 %
Error: |NO CONNECTION|
The following higher-level classes for representing a tracker connection and tool poses should be implemented:
Tracker
class:
connect()
raising IOError
(auto-connect()
on __init__
)disconnect()
raising IOError
connected()
tool_pose = capture(tool_id)
raising
IOError
if not connected()
ValueError
if tool_id
invalidToolPose
class:
id()
=> not None
quaternion()
=> of len()
4coordinates()
=> of len()
3quality, error = quality()
=> between 0.00 - 1.00 (100%), error is what is returned by tracking systemtimestamp()
=> python -c "import time; print('{:.10f}'.format(time.time()))"
now()
This is related to #2
Always getting an invalid port handle selected
error when trying to use the newer NDI control units.
See for instance this sample dataset
pylint complains about too-many-locals
in the display_status
function.
This is possibly an indication that this function is doing too much and needs to be simplified.
8 poses collected
saved to file ...
After #24 maybe the following format would play more nicely on a wider range of computers (due to terminal line width):
| Device | Signal | Error | Information |
-------------------------------------------------------------------------
[✓] [====> ] 54 % 1.54 mm info message here.
To fix an ugly look like this:
1:
1:
coordinates: [91.4, 84.2, -269.16]
error: 0.058800000000000005
quality: 0.9803999999999999
quaternion: [0.2569, -0.8323, -0.46440000000000003, -0.15940000000000001]
timestamp: 1519136567.998299
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.