WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-28-2014, 08:04 PM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Inertial Labs OS3D sensor not working in Vizard

Hi,

I'm able to get my OS3D sensor from Inertial labs working in quatview.exe, the Inertial Labs demo. However in Vizard it just returns 0,-0,0 when I print getEuler(). It always locks up the COM port as well. Everything runs as if the sensor is there but no data. Any ideas? Thanks.

"""
"""

import viz
import vizact
import vizinfo
import vizinput

#main window setup
viz.setMultiSample(4)
viz.fov(60)
viz.go(viz.STEREO_HORZ | viz.FULLSCREEN)
#Grab the main view.
view = viz.MainView

#Basic distortion correction
import vizfx.postprocess
from vizfx.postprocess.distort import PincushionEffect
effect = PincushionEffect(0.1)
vizfx.postprocess.addEffect(effect)
vizinfo.InfoPanel()

#Add environment
#viz.addChild('gallery.osgb')
viz.addChild('piazza.osgb')

#Add the intersense tracker
#isense = viz.add('intersense.dle')
#tracker = isense.addTracker()
# Create Inertial Labs extension
InertialLabs = viz.add('InertialLabs.dle')
# Connect to sensor on port 9
tracker = InertialLabs.addOSv3(9)
tracker.reset()
#if tracker.valid():
# vizinput.message('Connection established to an Intersense device')
#else:
# vizinput.message('Failed to detect an Intersense device')

#Link tracker to main viewpoint
#viz.link(tracker,view)
#view.setEuler(tracker.getEuler,mask=viz.HEAD_ORI) ;

#Reset tracker when 'r' key is pressed
vizact.onkeydown('r',tracker.reset)

import vizcam
viz.cam.setHandler(vizcam.KeyboardCamera(forward=' w',backward='s', left='a',right='d',turnRight='e',turnLeft='q'))
viz.mouse.setVisible(viz.OFF)
def mousemove(e):
euler = view.get(viz.BODY_EULER)
euler[0] += e.dx*0.1
euler[1] += -e.dy*0.1
euler[1] = viz.clamp(euler[1],-90.0,90.0)
view.setEuler(euler[0],euler[1],mask=viz.BODY_ORI);

viz.callback(viz.MOUSE_MOVE_EVENT,mousemove)

def updateView():
view.setEuler(tracker.getEuler(),mask=viz.HEAD_ORI );
#print tracker.getEuler()

vizact.ontimer(0, updateView)
Reply With Quote
 

Tags
inertial labs os3d, os3d


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
Current working directory in Vizard Executable kevin Vizard 3 06-16-2011 11:31 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 10:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 10:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Tickle2 Demo not working in Vizard 3.0 mjabon Vizard 7 01-07-2008 03:59 PM


All times are GMT -7. The time now is 11:33 AM.


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