Vizard 7 » Reference » Input Devices » Gloves » 5DT data glove basics
7.6

5DT Data Glove basics

Adding hand movements to your Vizard world involves getting sensor data from a 5DT data glove. Simply include a few lines of code to add the device.

PORT_5DT_USB = 0
sensor = viz.add('5dt.dls')

You can also add objects, for example a 3D hand, and map the glove's data.

import hand
h = hand.add(sensor)
h.setEuler(0,-90,0)

Finally, you can attach objects and update their positioning to be the same based on the glove's finger tip range.

tips = []
S = 0.01
for x in range(5):
    tips.append( viz.add('white_ball.wrl',scale=(S,S,S),color=viz.BLUE) )

def UpdateFingerTips():
    for x,tip in enumerate(tips):
        mat = h.getFingerTip(x)
        tip.setPosition(mat.getPosition())
        tip.setQuat(mat.getQuat())
    
vizact.ontimer(0,UpdateFingerTips)

Further information

 

www.5dt.com -- The official site for 5DT products.

See also

In this section:

Immersion CyberGlove plug-in

5DT plug-in

Other sections:

Tutorial: 5DT data gloves - Tutorial in the Hardware section on how to use a 5DT data glove.