demo of new hand.getFingerTip()
Just thought I'd put in a demo that works in the beta, and some feedback.
Code:
# This is a demonstration of the new hand.getFingerTip() It would be nice if the caller could get the matrix OR just the position, but my demo above shows how someone could use the vizmat.Transform class to extract useful scale, rotation, translation components separately. Using the hand model gestures in .manual() mode highlights the fact that there is no such thing as .spinto() on a VizBone. Perhaps that can be added in the future so the hand can be flexed open and closed over the course of a few milliseconds instead of snapping to each new gesture position. (It's not critical to my work.) |
Nice. I like how you differentiated between just using the position and using the full matrix to add orientation.
I like the idea of adding actions to bones. That would really ease manually animating them. Now that I'm thinking about it, it would also be cool if our hand model had some built in animations... |
where is HAND?
Hi, I tried to import hand, but I received an error. Is it hand a standard module of vizard?
thank you so much. giancarlo |
Hand is a standard module. Can you post the text of your error?
|
this is the error....
File "hand.py", line 23, in ?
aHand = hand.add(aSensor) AttributeError: 'module' object has no attribute 'add' |
Save the name of your script to something besides hand.py because it is overriding the standard hand module.
|
I did it
I saved the example with a different name, but I received the same error.
Giancarlo ** ERROR: Failed to connect to 5DT glove on COM1 Traceback (most recent call last): File " File "mano.py", line 9, in ? import hand File "hand.py", line 23, in ? aHand = hand.add(aSensor) AttributeError: 'module' object has no attribute 'add' ** Load Time: 4.00 seconds |
If you have your previous hand.py file in the same directory as your new mano.py file then mano.py will import your hand.py file and not the standard Vizard module.
|
Also, if there is a hand.pyc file in your script directory, you need to delete it.
|
great I understood all my problems thank you so much.
Giancarlo |
All times are GMT -7. The time now is 12:29 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC