WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #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
  #2  
Old 07-28-2014, 09:12 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
The InertialLabs plug-in is not supported on 64-bit versions of Vizard. Try connecting in the 32 bit version of Vizard 5 if you have not done so already. Also make sure no other software is connecting to the tracker when you run Vizard.
Reply With Quote
  #3  
Old 07-29-2014, 09:01 AM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Same issue in 32bit. No other software is running. Code loads and appears to connect but data prints all 0's. I'm not connected to a sensor hub. My connection is USB directly from the OS3D.
Reply With Quote
  #4  
Old 07-29-2014, 04:45 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
Do you get the same results printed out every second with this simple example?

Code:
import viz
import vizact
viz.go()

InertialLabs = viz.add('InertialLabs.dle')
sensor = InertialLabs.addOSv3(9)

def printData():
	print sensor.getEuler()
	
vizact.ontimer(1, printData)
Reply With Quote
  #5  
Old 07-30-2014, 03:27 PM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Same response.

Prints
[0.0,-0.0,0.0]
Reply With Quote
  #6  
Old 07-30-2014, 06:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
Are you able to receive the data when you run the same code in Vizard 4? You can download a trial version if you need that from our downloads page.
Reply With Quote
  #7  
Old 07-30-2014, 06:45 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
Also, what results do you get when using the sensor bus code:

Code:
import viz
import vizact
viz.go()

InertialLabs = viz.add('InertialLabs.dle')
sensors = InertialLabs.addSensorBus(port=9)
sensor1 = sensors[0]

def printData():
	print sensor1.getEuler()
	
vizact.ontimer(1, printData)
Reply With Quote
  #8  
Old 07-31-2014, 11:17 AM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Same response in Vizard 4 for addOSv3 version. addSensorBus version error's out with invalid index.
Reply With Quote
  #9  
Old 08-28-2014, 02:47 PM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Any updates? It's been quite a while now.
Reply With Quote
  #10  
Old 08-29-2014, 01:23 PM
Kevin Chiu Kevin Chiu is offline
WorldViz Team Member
 
Join Date: Feb 2012
Posts: 26
Hi,

Can you try with the addSensorBus version again with another index?
What returns to you when you add this line of code?
Code:
print sensors
Also can you attach a screen shot about your device manager and point out where the Inertial Labs sensor is if possible?

Best,
Kevin
Reply With Quote
  #11  
Old 11-11-2014, 07:51 AM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
Back on this again as I have a trade show in 3 weeks where I'd like to be able to use Vizard with the Inertial Labs sensor.

Sensor bus version doesn't work. Probably because I don't have a sensor bus.

I've attached my device manager screen shot. Shows on COM 2 as expected.

I'm running the latest Vizard 5 32 bit.
Attached Thumbnails
Click image for larger version

Name:	InertialLabsDeviceManager.png
Views:	598
Size:	44.7 KB
ID:	673  
Reply With Quote
  #12  
Old 11-11-2014, 07:56 AM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
And like I mentioned previously, it connects. It just doesn't read any data. After connecting it seems to lock the device up. I have to unplug it and plug it back into the computer to get any of the Inertial Labs sample programs to run with it. When using "Inertial Labs Simple.py" shown below.

import viz
import vizact
viz.go()

InertialLabs = viz.add('InertialLabs.dle')
sensor = InertialLabs.addOSv3(2)
print sensor

def printData():
print sensor.getEuler()

vizact.ontimer(1, printData)


I get this response:

************************************************** ****************************
** Loading Inertial Labs simple.py
************************************************** ****************************
InertialLabs.dle InertialLabs Extension
viz.VizExtensionSensor(0)
** Load Time: 1.18 seconds
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
[0.0, -0.0, 0.0]
Reply With Quote
  #13  
Old 11-11-2014, 03:20 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
We don't have a unit to test with but we'll check in with InertialLabs and contact you directly.
Reply With Quote
  #14  
Old 11-18-2014, 11:06 PM
mellott124 mellott124 is offline
Member
 
Join Date: Jul 2014
Posts: 20
We got this working by placing my inertiallabs_sdk_lite.dll in the Vizard5/bin folder. The dll came from the Inertial labs Lite SDK API bin folder that came with the sensor.
Reply With Quote
  #15  
Old 11-09-2015, 11:50 AM
craigpet craigpet is offline
Member
 
Join Date: Aug 2015
Posts: 6
I'm experiencing nearly this exact same phenomenon, except that it occurs intermittedly with period where it works correctly. It seems random in that sometimes a run a script and it works fine, but after exciting the script and trying to rerun it I get the same behavior as described above. My Vizard5/bin folder already contains a copy of Inertiallabs_SDK_Lite.dll
Reply With Quote
  #16  
Old 11-10-2015, 04:32 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
Are there any issues when connecting to InertialLabs' Quatview application? Make sure QuatView is not running when you try to connect in Vizard. What is the Windows OS? Is this Vizard 5.2?
Reply With Quote
  #17  
Old 11-13-2015, 08:36 AM
craigpet craigpet is offline
Member
 
Join Date: Aug 2015
Posts: 6
I just turned Quatview on for the first time, and it is showing similar behavior to Vizard. We're running 32-bit Vizard 5.2 on 64-bit Windows 7.
Reply With Quote
  #18  
Old 11-13-2015, 10:31 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
You'll need to contact InertialLabs support for help with connecting to QuatView.
Reply With Quote
  #19  
Old 11-13-2015, 11:25 AM
craigpet craigpet is offline
Member
 
Join Date: Aug 2015
Posts: 6
Oh it did connect, just intermittedly and it doesn't correctly disconnect afterwards (I believe the Com5 port locks up, as trying to run my vizard script afterwards throws errors with connecting to the OS3D).
Reply With Quote
Reply

Tags
inertial labs os3d, os3d

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
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 04:38 PM.


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