WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-14-2009, 12:32 PM
EnvisMJ EnvisMJ is offline
Member
 
Join Date: May 2009
Location: Purdue University, West Lafayette, Indiana
Posts: 44
Intersense IS-900 : Button Toggle?

We are using an Intersense IS-900 wand, headtracker, etc with our cave system for user input.

We are able to read 'ON/OFF' state on all of the buttons, and position data from the analog stick.

However, we are trying to reduce our runtime lag by streamlining our code. We want to access the 'Toggle ON/OFF' state output from the buttons so we don't have to run a loop constantly checking this. I know that the hardware is able to output this (we used it previously when working with VR Juggler) but we can't seem to figure out how to access it.

Anyone know how to?
Reply With Quote
  #2  
Old 12-16-2009, 03:54 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can use a callback for sensor events to be notified when a button is pressed. Is this what you are looking for?
Code:
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)
Reply With Quote
  #3  
Old 05-27-2010, 12:28 PM
mouweimin mouweimin is offline
Member
 
Join Date: May 2010
Posts: 3
wand stick event

Thanks for the answers for handling the intersense button up and down events. I had the same question.

Is there an event ID for intersense wand Joystick movement, similar to vizjoy.MOVE_EVENT? I wanted to navigate using intersense 900 wand joystick. Thanks.
Reply With Quote
  #4  
Old 05-27-2010, 03:58 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can get the joystick position every frame and update the viewpoint like it's done in the joystick navigation example script.

To get the joystick position use the Intersense plug-in's <sensor>.getJoystickPosition() command.
Reply With Quote
  #5  
Old 06-22-2010, 03:36 PM
EnvisMJ EnvisMJ is offline
Member
 
Join Date: May 2009
Location: Purdue University, West Lafayette, Indiana
Posts: 44
Sorry for the delay...
Jeff, will that return only once per 'button down' and only once per 'button up' ?
The problem we are having currently is it repeatedly returns that the button is pressed.

Ex. Button is to be used to 'pick up' an item.
Item is indicated by user.
Button is pressed, however, because it is repeatedly returning the current button state, it actually picks up and drops the item multiple times during the fraction of a second the user has the button pressed. So it's a bit of a gamble as to whether the item remains 'picked up' by the time the button is released. Same problem exists when 'releasing an item'.
Reply With Quote
  #6  
Old 06-22-2010, 04:58 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, each of those events should occur once when a button is pressed and released . Can you post some sample code that shows your problem?
Reply With Quote
  #7  
Old 07-23-2015, 05:11 AM
rajnish_xenium rajnish_xenium is offline
Member
 
Join Date: Jul 2015
Location: Santacruz ,Mumbai,Maharashtra,India
Posts: 12
Reagarding Corner Cave Room in Vizard for VR Application for wand and Joystick button

Hi Jeff..
Please help me for the following ..
i got my wand connected to the PPT machine..via VRPN...for my Corner Cave Room..
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)

#wand coonection to the PPT machine

code:

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)

#You code for getting data of Buttons.on Wand

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)


...I m not getting any response ..from the wand..

I m performing building application on Vizard 5 for Corner cave room ...but unable to get the output..

i m cleared with python ..vizard concepts ..but there a confusion for markerid,sensors..
How many sensors are there on wand..


it the LED blink on wand is sensors?
is Joystick have sensor..?
buttons on wand has sensor..?
triggers button ahs sensor..?
what will be the marker ids for that..?
I m confused..?

Please help me to get clear concepts for cearance for marker id ..and sensors..

Please help me

Our company ..Xenium Digital Pvt Ltd has just purchased PPT system..with cameras..we have PPT studio set up..


Please help me at the earliest...

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..


M.Rajnish Vishwakarma(Developer at Xenium Digital Pvt Ltd.)
Reply With Quote
  #8  
Old 07-23-2015, 11:10 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
This thread shows the VRPN client settings that are necessary to get the wand data directly into Vizard.

However, rather than connecting to the wand in this way, I would suggest using vizconnect to set up a corner cavern configuration script. You can add the PPT wand input from the inputs tab in vizconnect. Go through the vizconnect tutorials for a general understanding of how to use it. There is a preset option for PPT corner cave that you can select if you're running both walls off a single machine. If each wall is run by a separate machine you'll need to use the advanced section of vizconnect to configure the trackers,display, wand etc.
Reply With Quote
  #9  
Old 07-28-2015, 10:33 PM
rajnish_xenium rajnish_xenium is offline
Member
 
Join Date: Jul 2015
Location: Santacruz ,Mumbai,Maharashtra,India
Posts: 12
Smile Regarding Corner Cave in Vizard 5 using PPT-E System on a remote machine

Hi Jeff..thanx for the referene for Viz Connect..
I got the want connected to the viz connect using Vizard 5... i also got the Status of Wand&Signal and datas of Yaw roll and pitch.. in the VizConnect...
My Prset configuration Script...which was
..A Corner Caven with PPT Configuration..

i got the a Preset Configuration Script...and i saved as ..'corner_cave.py' file..instead of 'vizconnect_config.py'..

The code of 'corner_cave.py' file is...



------------------

Now i want to create a script in which i want to get the wand signals and Button data and inputs data..in my newly created script..suppose..'navigation.py' in which ill move my viewpoint with refrefence to Wand JoyStick and Button Data and Inputs Data..from The wand which is active in VizConnect Window...

...Jeff please help me to achieve this...as i m alone working on it..and i will do it..

I want to create another script..in whioch i should navigate my ViewPoint with the help of wand..
I know that ..
In my newly script.'navigation.py'..
i have to write..the line as well

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

or:

# load vizconnect configuration file
import vizconnect
vizconnect.go('vizconnect_config.py')

#get a handle to the input by name
input = vizconnect.getInput('mouse_buttons')

or:

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

keyTracker = vizconnect.getTracker('keyboard').getNode3d()
..

Please help me with exact code of wand helping me to move my Viewpoint...

Waiting for ur reply Jeff..Thanx..for the last help..Thanx a lot...

Mr.Rajnish Vishwakarma(Developer at Xenium Digital Pvt Ltd)
..Waiting for ur reply..
Reply With Quote
  #10  
Old 07-28-2015, 10:40 PM
rajnish_xenium rajnish_xenium is offline
Member
 
Join Date: Jul 2015
Location: Santacruz ,Mumbai,Maharashtra,India
Posts: 12
Code generated for Corner Cave with PPT Configuration through VizConnect

Hi jeff please find the code of ...


i got the a Preset Configuration Script...and i saved as ..'corner_cave.py' file..instead of 'vizconnect_config.py'..

The code of 'corner_cave.py' file is attached as a file ...in the doc file.

The attached '.doc' file contains the code of ...'corner_cave.py' file..instead of 'vizconnect_config.py'..

Note :

'vizconnect_config.py' is same as 'corner_cave.py'
I have just changed the name..
Reply With Quote
  #11  
Old 07-29-2015, 04:19 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The vizconnect file maps the wand input signals to the wand magic carpet transport in the transport > mappings section. Is the wand connecting in vizconnect under the inputs tab? Can you see the position and orientation of the transport changing in the transport tab (press the status button)?
Reply With Quote
  #12  
Old 08-01-2015, 03:18 AM
rajnish_xenium rajnish_xenium is offline
Member
 
Join Date: Jul 2015
Location: Santacruz ,Mumbai,Maharashtra,India
Posts: 12
Smile Regrding Corner cave

Yes now it is working..fine..yesw now my wand is navigating a transport..
now..i want to navigate into a Plane Factory..or airport..and also inside..into the interior part of the plane..with wand..but want only my MainView with my wand not the transport..
How can i move my MainView with the wand..Analog Buttons..with the JoyStick on Wand with PPT-E System.

Waiting for ur reply Jeff..thanx for ur reply..

Mr.Rajnish Vishwakarma(Developer at Xenium Digital Pvt Ltd,Mumbai)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Properly aligning the intersense with the PPT Systems Z Axis shivanangel Precision Position Tracker (PPT) 0 11-10-2009 11:35 AM
world is tilting - intersense or code problem? billjarrold Vizard 2 11-06-2009 08:03 AM
intersense with 5DT glove sjp Vizard 2 04-06-2009 07:22 AM
using demo with intersense G-Chan Vizard 1 02-06-2006 02:05 PM
intersense orientation jargon Vizard 2 05-14-2005 04:55 PM


All times are GMT -7. The time now is 04:50 PM.


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