Problem connecting dataglove
Hi,
I am trying to connect an Intersense 5DT glove. It works fine when I connect it within the main file of my program, but when I try to connect it in a different python module I always get an error. Of course I could just put the code in my main module, but I have a thing for keeping things nice and tidy. Here is some sample code to illustrate my problem: #file glovetest1.py #this works fine when I run it in vizard import viz import hand PORT_5DT_USB = 0 sensor = viz.add('5dt.dls') glove = hand.add(sensor,hand.GLOVE_5DT) viz.MainView.translate(0,0.02,-0.4) viz.go() ----- #file glovetest2.py #this does not work import glovetest ----- The output on the console when I run glovetest1.py: ************************************************** ******** ** Loading glovetest1.py ************************************************** ******** 5dt.dls 5DT Glove Driver v1.0 ** NOTIFY: Connected to 5DT DG5 Ultra USB on USB0 Loading File: hand.cfg ** Load Time: 0.38 seconds And when I run glovetest2: ************************************************** ******** ** Loading glovetest2.py ************************************************** ******** 5dt.dls 5DT Glove Driver v1.0 ** ERROR: Failed to connect to 5DT glove on COM1 Loading File: hand.cfg ** Load Time: 3.85 seconds Can anyone help me with this problem? Thanks! |
In your code that works it looks like you are connecting to the glove over USB but in the one with an error Vizard is looking for a glove over the serial connection. What if you specify a USB port in the module you import?
|
All times are GMT -7. The time now is 05:50 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC