WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-30-2015, 08:18 AM
vserchi vserchi is offline
Member
 
Join Date: Sep 2013
Posts: 7
Connecting Vizard and NDI Optotrak

Hi,
I am trying to connect Vizard with Optotrak (Vizard 4.0 Enterprise). I have tried both through a Ethernet connection both through serial port. I have failed in both the cases and probably there is something I donít get about it.

Ethernet connection:

My code:

Code:
import viz
viz.go()
opto = viz.add('optotrak.dle',0,'169.254.187.18')  # 192.219.236.23 sensor adding 
body = opto.getBody(0)                                                 # first rigid body adding
viz.link(body, viz.MainView)
Error:
** ERROR: Failed to connect to Optotrak server at 169.254.187.18:3020
** ERROR: Failed to create extension: optotrak.dle
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "F:\VRproject\Vizard1.py", line 6, in <module>
body = opto.getBody(0) #first rigid body adding
** Load Time: 21.53 seconds
AttributeError: 'VizExtension' object has no attribute 'getBody'

Probably I am setting wrong the port number or the IP address (or both). I have looked for the IP address of the connection through the cmd -> ipconfig -> netstat Ėa.
Q1. Any suggestion on what I may try to make it working?
Q2. What does the Ď0í in opto = viz.add('optotrak.dle',0,'169.254.187.18') mean? Should I change it?

Serial connection: (serial to USB port in the computer running Vizard)

I tried to run a couple of examples I found in the forum.

My code:

First attempt:
Code:
import serial 
import viz
viz.go()
ser = serial.Serial(2, 4800, timeout=1)     #ser = serial.Serial('COM3'); 
while True:
                x = ser.read() 
                print x
Second attempt:
Code:
import serial 
import viz
viz.go()
while True:
                buffer = buffer + ser.read(ser.inWaiting())
                if '\n' in buffer:
                                lines = buffer.split('\n')  # Splits buffer block into lines
                                last_received = lines[-2]
                                buffer = lines[-1]
                                print last_received
I donít get any error in this case but I didnít get anything print as output. In the first case as output I got blank lines. In the second case it never passes through the if control.
Q3. I donít know if I donít receive anything or if didnít understand how is the form of the output from the serial port. Any idea? Where can I read more about that? Do you have any example on how to connect Vizard and Optotrack through the serial port?

I have two different serial ports on the Optotrack unit. One seems to be for data and one for timing stuff. I have tried to make the connection with both but anything changed.
Q4. Do you know which one have I to use?

I really appreciate any help you may give me.
Valeria
Reply With Quote
  #2  
Old 02-02-2015, 10:20 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
Use optotrack.dle for establishing the connection. There could be an issue with the network connection or you've incorrectly specified the IP address. You can also try the Optotrack server name instead of IP address. Verify that the Vizard machine and Optotrack server can ping each other. Disable any firewalls/virus scanners on the machines as these may block network communication. Also, take a look at this video tutorial as it may help.
Reply With Quote
  #3  
Old 02-03-2015, 07:09 AM
vserchi vserchi is offline
Member
 
Join Date: Sep 2013
Posts: 7
Hi Jeff, thank you for replying.
I have disabled any firewalls and antivirus as you suggested. I have also checked the IP address I had inserted and if the Optotrak server and the Vizard machine can ping each other. It seems everything is correct in the information I am typing. I am attaching some screenshots about of my cmd window. Can you control if there is anything wrong or weird in what I am doing?
I have tried to add the port information following the IP address. the message error displayed is now different.

Code:
import viz
viz.go()

opto = viz.add('optotrak.dle',0,'169.254.187.18 : 139') 
body = opto.getBody(0) 		#first rigid body adding
viz.link(body, viz.MainView)
** ERROR: No data is being sent by Optotrak server at 169.254.187.18 :139
** ERROR: Failed to create extension: optotrak.dle
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "I:\VRproject\Vizard1.py", line 6, in <module>
body = opto.getBody(0) #first rigid body adding
AttributeError: 'VizExtension' object has no attribute 'getBody'


Where do I find the name of the Optotrak server?

Thank you,
Valeria
Attached Thumbnails
Click image for larger version

Name:	ipconfigMod.png
Views:	406
Size:	189.8 KB
ID:	676   Click image for larger version

Name:	nbtstat.png
Views:	383
Size:	53.6 KB
ID:	677   Click image for larger version

Name:	netstat.png
Views:	408
Size:	71.9 KB
ID:	678   Click image for larger version

Name:	ping.png
Views:	388
Size:	96.5 KB
ID:	679  
Reply With Quote
  #4  
Old 02-06-2015, 01:04 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,448
You should verify with NDI support that data is being streamed from their software. If they provide a sample application to receive the data, see if that works for you.
Reply With Quote
Reply

Tags
connection, ethernet, ndi, optotrak, serial

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


All times are GMT -7. The time now is 04:50 PM.


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