|
#1
|
|||
|
|||
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) |
#2
|
|||
|
|||
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.
|
#3
|
|||
|
|||
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.
|
#4
|
|||
|
|||
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) |
#5
|
|||
|
|||
Same response.
Prints [0.0,-0.0,0.0] |
#7
|
|||
|
|||
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) |
#8
|
|||
|
|||
Same response in Vizard 4 for addOSv3 version. addSensorBus version error's out with invalid index.
|
#9
|
|||
|
|||
Any updates? It's been quite a while now.
|
#10
|
|||
|
|||
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 Best, Kevin |
#11
|
|||
|
|||
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. |
#12
|
|||
|
|||
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] |
#13
|
|||
|
|||
We don't have a unit to test with but we'll check in with InertialLabs and contact you directly.
|
#14
|
|||
|
|||
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.
|
#15
|
|||
|
|||
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
|
#16
|
|||
|
|||
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?
|
#17
|
|||
|
|||
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.
|
#18
|
|||
|
|||
You'll need to contact InertialLabs support for help with connecting to QuatView.
|
#19
|
|||
|
|||
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).
|
Tags |
inertial labs os3d, os3d |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
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 |