WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-24-2010, 10:47 AM
Jeethridge Jeethridge is offline
Member
 
Join Date: Aug 2010
Posts: 1
Reading sensor data via UDP

I have an EEG system I'd like to use to send data to vizard over our network. The issue is that the only way to do this is by having the software associated with our system send UDP packets. We've tried using a combination threading and UDP in python to parse the packets, however it seems to run very slowly in vizard. The other option we are considering is creating our own sensor plugin using visual C++ that would handle the network communication in it's own thread. The assumption is that this might be a more reliable way for vizard to read the data streaming in. Can anyone verify that this might be the correct way to proceed?

Essentially the flow of the data looks something like this:

EEG System --> BCI2000 Software ---> Network (UDP) ---> Vizard

Unfortunately UDP is our only option and we are trying to find the most reliable method of transmitting the data to vizard. We are using a dedicated switch to minimize latency and packet loss. When our UDP thread runs in vizard it's just incredibly laggy compared to when running in python without vizard. We've been printing the packets to the command window as they come in to get an idea of the timing, which I understand is not optimal. Perhaps someone could suggest a better way of measuring any delay that might be caused by the vizard engine as well.

Thanks much.
Reply With Quote
  #2  
Old 08-24-2010, 10:51 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try adding the following line to your script:
Code:
viz.directormode(viz.DIRECTOR_FAST)
This essentially tells Vizard to allow Python threads to run while rendering the scene, which should give more time for your Python thread to run.

If this doesn't help, then there might be some other issue with your code. In this case it would help if you posted some of your code.
Reply With Quote
Reply

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
Reading form serial port strangeness nige777 Vizard 6 06-22-2010 12:04 PM
Reading bone movement from animations Enlil Vizard 5 08-14-2008 02:29 PM
Reading in parameters with a published exe Jerry Vizard 1 03-03-2008 09:46 AM
csv reading kgarr Vizard 1 02-27-2006 12:02 PM
A simple Plug_in for reading data from serial port sled Plug-in development 0 08-12-2003 09:52 AM


All times are GMT -7. The time now is 01:52 PM.


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