You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@stewdio
Heya, I'm using handy.js for a machine learning project and you have saved me a lot of time! Thanks for the amazing library. However I think I might have found a bug but I'm not sure if it's a problem with my code or with the library.
The problem that I encountered was that handy.js was not properly searching up distances to the predefined poses, and I traced the problem to this:
where there was an optimization to terminate the search early if the first joint had its coordinates be all zero. I double checked with your live demo but your demo seemed to work fine.
However, when I ran it in my code, even with all the non-essential parts cut out, the first joint position was always at [0, 0 ,0] which causes the pose search to always fail. The other joint positions were however not all 0s, so the termination should not have happened.
the first joint position is still some ridiculously small number (e-13!!) so probably its just some numeric errors from the matrix operations, so honestly I'm not sure what I'm doing wrong in my code as in your demo, the first joint does not return a position so close to all zeros.
BUT, upon closer inspection after I removed the rounding from handy.js, the position of the first joint also are quite often in the >0.5 range in your live demo, which perhaps might have cause some skipped searches. While I'm still figuring out why the coordinates of the first joint of my hands are almost all zero, which may as well be specific to my code, perhaps the rounding may also be causing issues for other people?
The text was updated successfully, but these errors were encountered:
@stewdio
Heya, I'm using handy.js for a machine learning project and you have saved me a lot of time! Thanks for the amazing library. However I think I might have found a bug but I'm not sure if it's a problem with my code or with the library.
The problem that I encountered was that handy.js was not properly searching up distances to the predefined poses, and I traced the problem to this:
handy.js/src/Handy.js
Lines 772 to 774 in 85f22ad
where there was an optimization to terminate the search early if the first joint had its coordinates be all zero. I double checked with your live demo but your demo seemed to work fine.
However, when I ran it in my code, even with all the non-essential parts cut out, the first joint position was always at [0, 0 ,0] which causes the pose search to always fail. The other joint positions were however not all 0s, so the termination should not have happened.
If I remove the rounding from here:
handy.js/src/Handy.js
Lines 522 to 524 in 85f22ad
the first joint position is still some ridiculously small number (e-13!!) so probably its just some numeric errors from the matrix operations, so honestly I'm not sure what I'm doing wrong in my code as in your demo, the first joint does not return a position so close to all zeros.
BUT, upon closer inspection after I removed the rounding from handy.js, the position of the first joint also are quite often in the >0.5 range in your live demo, which perhaps might have cause some skipped searches. While I'm still figuring out why the coordinates of the first joint of my hands are almost all zero, which may as well be specific to my code, perhaps the rounding may also be causing issues for other people?
The text was updated successfully, but these errors were encountered: