PDA

View Full Version : How to use grabber tool with wand?


Samuli
11-02-2015, 11:44 PM
Hi Jeff,
I'd appreciate if you have some knowledge on how to use grabber tool with wand using ppt-tracking and wand 2014? Few more questions: What are proxy tools? What is the proxywrapper/grabberwrapper, their functions and what does the following code snippet from box stacker demo code do?

def init():
"""Initialize the demo, only called once"""
# add grabber tools based on proxy tools
for proxyWrapper in vizconnect.getToolsWithMode('Proxy'):
grabberTool = tools.grabber.HandGrabber(usingPhysics=True,
usingSprings=True,
placementMode=tools.placer.MODE_MID_AIR)

name = 'box_stacker_grabber_tool_based_on_'+proxyWrapper. getName()
grabberWrapper = vizconnect.addTool(raw=grabberTool,
name=name,
make='Virtual',
model='Grabber')
# parent the grabber wrapper to the proxy's parent
grabberWrapper.setParent(proxyWrapper.getParent())
I can't find any relevant information about these things in the Vizard documentation/reference.

Jeff
11-03-2015, 02:54 PM
You can add a grabber tool and map the wand input signals to the grabber functions in vizconnect. The vizconnect avatars and tools (http://docs.worldviz.com/vizard/#vizconnect_tutorial_tool_avatar.htm) tutorial covers this topic using a desktop setup but the same concepts apply if you're using PPT tracking and wand. The proxy tool is used with the demo launcher as a placeholder tool. This is most likely unnecessary for your application but a description of the proxy tool is shown when you select it in the vizconnect > tools dialog.