Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Pose' not kept, only recognized in one frame #3

Open
Fygo opened this issue Oct 29, 2014 · 1 comment
Open

'Pose' not kept, only recognized in one frame #3

Fygo opened this issue Oct 29, 2014 · 1 comment

Comments

@Fygo
Copy link

Fygo commented Oct 29, 2014

Hi there,
First of all, a big thanks for this, too (I have been using your leap motion as3 library, good stuff).

I am having some troubles with the 'pose', seems like a gesture is recognized but it is never "kept" despite maintaining the gesture:
hub.on('frame', function(frame) {
var e = document.getElementsByTagName("p")[0];
e.innerHTML = "Frame id: " + frame.id + ", timestamp: " + frame.timestamp + ", pose: " + frame.pose; //this blinks when the gesture happens, correctly shows the gesture for a tiny moment
});
...
hub.on('pose', function(pose) {
var e = document.getElementsByTagName("p")[0];
e.innerHTML = pose; //this does exactly the same thing as the code above, only flashes the gesture, then it shows [Pose invalid]
});

So what I do see is [Pose invalid], then it flashes [Pose type:4 POSE_FINGERS_SPREAD] and gets back to [Pose invalid] while still keeping my fingers open. The Visualizer in the daemon shows it correctly: the cube is yellow till I close/move my fingers. The gestures.html from your examples works the very same way as my test, basically can't do anything with the flamingo.
Any ideas? Should I just wait for a POSE_SOMETHING => save it to a var and then reset it when POSE_NONE occurs? Is that the (correct) way?

@logotype
Copy link
Owner

Hi
Thanks!
Yes, this is a state issue. As you say, when the gesture is triggered - the event will be emitted once (and only in that "frame"). The problem is that (as far as I know), the Myo APIs do not emit any gesture states such as start/update/stop. This will have to be built/determined into the MyoJS library, and will look into this!

BR,
Victor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants