PDA

View Full Version : VRPN tracker, detecting device.


nabrahamson
08-14-2012, 08:38 AM
Hey Vizard gurus, I have a quick question about your VRPN interface. I have working code using the VRPN tracker with a kinect device. What I want to do is to detect if a kinect is plugged into the computer, and disable the kinect interface if no kinect is found. I see when I run my script the following message if the kinect is not plugged in:


VRPN Error
(18) from Tracker0: No response from server for >= 10 seconds


Is there a way to programatically detect this error so that I can switch to a different user interface if the Kinect isn't plugged in?

farshizzo
08-14-2012, 08:55 AM
The vrpn objects have a getSampleNumber() and getSampleTime() method for retrieving the number/time of the last received sample. You could setup a timer to check these values and trigger an event if they haven't changed for over 10 seconds.

nabrahamson
08-14-2012, 09:17 AM
The vrpn objects have a getSampleNumber() and getSampleTime() method for retrieving the number/time of the last received sample. You could setup a timer to check these values and trigger an event if they haven't changed for over 10 seconds.

I've considered this route, but since they don't trigger until the kinect detects another user, it's not really the solution I am going for. In this scenario, the kinect can be plugged in and communicating with FAAST, but there is no user in front of it. The result is a false positive since the two functions mentioned will return 0 and 0.0 even when there is a kinect plugged in and recognized by the system.

Is there a way to catch what vizard is printing to the console? If I had the ability to do that, then I could watch for VRPN Errors, that are being printed out.

farshizzo
08-23-2012, 11:01 AM
That error message is printed deep within the VRPN source. I'm not aware of any way to programmatically detect it, other than modifying the VRPN source.

pankaj bansal
04-24-2013, 02:03 PM
@nabrahamson

Hey I want to ask if you were able to do this. I also want to do the same and have not find a solution yet..

regards
Pankaj bansal