WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Inertial Labs OS3D sensor not working in Vizard (https://forum.worldviz.com/showthread.php?t=5116)

mellott124 07-28-2014 08:04 PM

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)

Jeff 07-28-2014 09:12 PM

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.

mellott124 07-29-2014 09:01 AM

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.

Jeff 07-29-2014 04:45 PM

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)


mellott124 07-30-2014 03:27 PM

Same response.

Prints
[0.0,-0.0,0.0]

Jeff 07-30-2014 06:02 PM

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.

Jeff 07-30-2014 06:45 PM

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)


mellott124 07-31-2014 11:17 AM

Same response in Vizard 4 for addOSv3 version. addSensorBus version error's out with invalid index.

mellott124 08-28-2014 02:47 PM

Any updates? It's been quite a while now.

Kevin Chiu 08-29-2014 01:23 PM

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

mellott124 11-11-2014 07:51 AM

1 Attachment(s)
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.

mellott124 11-11-2014 07:56 AM

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]

Jeff 11-11-2014 03:20 PM

We don't have a unit to test with but we'll check in with InertialLabs and contact you directly.

mellott124 11-18-2014 11:06 PM

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.

craigpet 11-09-2015 11:50 AM

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

Jeff 11-10-2015 04:32 PM

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?

craigpet 11-13-2015 08:36 AM

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.

Jeff 11-13-2015 10:31 AM

You'll need to contact InertialLabs support for help with connecting to QuatView.

craigpet 11-13-2015 11:25 AM

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


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

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