WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Intersense-900 Wand Joystick and Buttons. (https://forum.worldviz.com/showthread.php?t=5125)

Daniel1 08-05-2014 04:15 PM

Intersense-900 Wand Joystick and Buttons.
 
Hello,
I am using Intersense 900 Sim tracker system with VIZARD 5. The wand and head tracker are navigating correctly. But the issue is that the joystick and the buttons on the wand is not working when I press them. Please how do I get the joystick and the buttons on the wand to work. Also, is there any special setting for the x,y,z, yaw,and pitch? Because my screen is not balance.

Jeff 08-08-2014 03:22 PM

The Intersense plug-in page shows how to get the joystick and button data. Here is a simple example that prints out joystick position and button presses:

Code:

import viz
import vizact

viz.go()

isense = viz.add('intersense.dle')
tracker = isense.addTracker()

def printJoystickData():
       
        print tracker.getJoystickPosition()
       
vizact.onupdate(1,printJoystickData)

def onSensorDown(e):
    if e.object is tracker:
        print 'Button',e.button,'down'
viz.callback(viz.SENSOR_DOWN_EVENT,onSensorDown)

def onSensorUp(e):
    if e.object is tracker:
        print 'Button',e.button,'up'
viz.callback(viz.SENSOR_UP_EVENT,onSensorUp)

How do you want the joystick and buttons to function?

Daniel1 08-09-2014 08:23 PM

Thank you for replying my message Jeff.
I want to be able to use my joystick to navigate the vizard virtual environment. For example, if I push the joystick up/down, it should move forward/backward on the screen, and if I push it sideward, it should move either left or right, depending on where I'm moving the joystick. I also want to balance the screen positioning too because, if I wear my shutter glass (head tracker) the screen is not balance. Thank you.

Jeff 08-11-2014 06:45 PM

There's no plug and play way to do this at the moment with the IS-900. Vizconnect supports virtual navigation techniques called Transports. Transports are controlled using signals from input devices but at the moment IS-900 is not yet added to Vizconnect's input device list. Most likely it will be included in the next release of Vizard due before Oct 1. If you don't want to wait it's also possible to manually modify a vizconnect file to connect to the IS-900 wand and map those signals to a transport. That would require getting familiar with vizconnect and the code it generates. If you have a current support contract please contact us at support@worldviz.com and we can create a file for you.

Daniel1 08-13-2014 08:59 AM

Okay Jeff, thank you so much for your reply.I really appreciate this.

Daniel1 08-21-2014 11:29 AM

Hi Jeff,
My code can't detect my joystick on the Wand. If I try running my code, it's gives this error:
************************************************** **************************
** Loading vizconnect_pi.py
************************************************** ****************************
** NOTIFY: 0 joystick(s) detected
intersense.dle Intersense Extension
** WARNING: Failed to connect to joystick
** WARNING: Failed to connect to joystick
Loading File: piazza.osgb
Loading File: piazza_animations.osgb
** Load Time: 34.37 seconds

Is there something that I can do to detect my Joystick on the Wand?

Jeff 08-21-2014 12:26 PM

Currently, you can't connect to IS-900 wand joystick and button data through vizconnect. Once it's supported, possibly by the next release, there will be an option for IS-900 wand input.

If you try to add a generic joystick device through the vizconnect interface you'll get an error.

Daniel1 08-29-2014 06:57 AM

Okay thank you so much!

Daniel1 10-19-2014 04:02 PM

Hello Jeff, please I would like to know if I can connect IS-900 wand joystick and button through vizconnect. If it is possible, how can I make it work. Please see our previous conversation. Thank you.

rajnish_xenium 07-22-2015 04:10 AM

Hi Jeff..
This is Rajnish Here....i got my wand connected to the PPT machine..via VRPN...for my Corner Cave Room..

...I m facing issue regarding my wand joystick.. and buttons....

..i used the code to connect to the wand PPT..

code:


import viz
import vizconfig
import vizdragdrop
import vizshape

viz.go(viz.FULLSCREEN | viz.QUAD_BUFFER) #to enable quad buffer, must be in the start

#Create a configurable object for stereo settings
bc= vizconfig.BasicConfigurable('stereo')
bc.addChoiceRadioItem('Stereo Format',[('Quad buffer',viz.QUAD_BUFFER), \
('Anaglyphic',viz.ANAGLYPHIC), \
('Side by Side TV',viz.STEREO_3DTV_SIDE_BY_SIDE), \
('Top Bottom TV',viz.STEREO_3DTV_TOP_AND_BOTTOM),\
('Horizontal Stereo for 2 channels',viz.STEREO_HORZ)],\
viz.MainWindow.stereo,viz.MainWindow.getStereo)
bc.addFloatRangeItem('Inter-pulilary Distance',[-.5,.5],fset=viz.MainWindow.ipd,fget=viz.MainWindow.getIP D)
bc.addFloatRangeItem('Screen Distance',[0,5],fset=viz.MainWindow.screenDistance,fget=viz.MainW indow.getScreenDistance)
bc.addFloatRangeItem('Field of View Vertical',[10,150],fset=viz.MainWindow.fov,fget=viz.MainWindow.getVe rticalFOV)
bc.addFloatRangeItem('Fusion Distance',[.2,10],fset=viz.MainWindow.fusionDistance,fget=viz.MainW indow.getFusionDistance)
vizconfig.register(bc)
vizconfig.getConfigWindow().setWindowVisible(True)

gallery = viz.add('gallery.osgb')

f = viz.add('vcc_female.cfg', pos=[0, 0, 2])
f.state(5)


import vizcam
tracker = vizcam.addPivotNavigate()
tracker.setPosition([0,1.5,0])
viz.link(tracker,viz.MainView)

#load files dropped on me
vizdragdrop.enable()
dropedModel = None
def onDropModelFile(e):
global dropedModel
if dropedModel:
dropedModel.remove()
else:
gallery.remove()
f.remove()
vizshape.addGrid()
dropedModel = viz.add(e.filenames[0])

vizdragdrop.onDropFile(None,onDropModelFile)

import vizconnect
vizconnect.go('vizconnect_config.py')

vrpn = viz.add('vrpn7.dle')
# Add PPT extension
ppt = viz.add('ppt.dle')
tracker0 = vrpn.addTracker('PPT0@WorldViz-PC',0)
tracker1 = vrpn.addTracker('PPT0@WorldViz-PC',1)


# Add wand
wand = ppt.addWand(1)

view = viz.MainView
viz.link(tracker0, view)
viz.link(tracker1, view)
....

afetr executin the above code. my MAINview ..get connected to the wand..but i m not getting the data from wand joystick and buttons..from ur code...

your code:

import viz
import vizact

viz.go()

isense = viz.add('intersense.dle')
tracker = isense.addTracker()

def printJoystickData():

print tracker.getJoystickPosition()

vizact.onupdate(1,printJoystickData)

def onSensorDown(e):
if e.object is tracker:
print 'Button',e.button,'down'
viz.callback(viz.SENSOR_DOWN_EVENT,onSensorDown)

def onSensorUp(e):
if e.object is tracker:
print 'Button',e.button,'up'
viz.callback(viz.SENSOR_UP_EVENT,onSensorUp)


Please help me for the following....Jeff

1)Wand joystick connection data and button data..

2)Wand an Avatar to move when i press my Joystick..for ex:back forward..left and right...

3)Want my wand to attach the virtual object..in the virtual environment...

Note; I m using Vizard 5 for building a Corner Cave room.. for my Virtual Reality..


All times are GMT -7. The time now is 11:47 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC