#1
|
|||
|
|||
UDP connection error
I am trying to integrate a motion capture system into Vizard. The capture software broadcasts its data through a UDP port(7001 by default); however, Vizard produces this error when the script runs :
ERROR: VizReceive::init() failed to bind socket to local port (UNKNOWN) I used the command prompt to make sure the port was being accessed by the capture software and it was. Also, I ran the program on another computer to check if the error was system based, which it wasn't. Maybe using TCP would help, but I couldn't find sufficient documentation on that. Here's the section of the script where the error probably originates from: import viz import vizact from Euler2Quat import * class PerceptionNeuron: def __init__(self): self.avatar = None self.mode = None self.sample_frame = list(range(180)) self.oculus_tracker = None self.offsetPos = [0,0,0] self.offsetEuler = [0,0,0] def connectUDP(self): myNetwork = viz.addNetwork('127.0.0.1') viz.net.addPort(7001) viz.net.removePort(4950) def connectAvatar(self,avatar): self.avatar = avatar def connectOculus(self,oculus_tracker): self.oculus_tracker = oculus_tracker def setMode(self,mode): self.mode = mode.lower() def setOffset(self,offset): self.offsetPos = offset[0:3] self.offsetEuler = offset[3:6] def onNetwork(self,e): if isinstance(e,viz.RawNetworkEvent): print e.raw_data ord_data = list(range(len(e.raw_data))) chr_data = list(range(len(e.raw_data))) space_index = [] for i in range(0,len(e.raw_data)-1): ord_data[i] = ord(e.raw_data[i]) chr_data[i] = chr(ord_data[i]) if ord_data[i]==32: space_index.append(i) if ("".join(chr_data[0:8])!='0 Char00'): raise ValueError('wrong header') sample_frame = list(range(180)) for i in range(0,179): sample_frame[i] = float("".join(chr_data[space_index[i+1]+1:space_index[i+2]])) self.sample_frame = sample_frame linkBVHtoAvatar(sample_frame,self) def startCallback(self): viz.callback(viz.NETWORK_EVENT,self.onNetwork) def connectViewpoint(self,view=viz.MainView): headLink = viz.link(self.avatar.getBone('Bip01 Head'),view) vizact.onupdate(viz.PRIORITY_PLUGINS+2,headLink.up date) if self.mode.find('oculus')!=-1 and self.mode.find('ppt')!=-1: headLink.preTrans([0,0.3,0.2]) else: headLink.preTrans([0,0.15,0.1]) |
#2
|
|||
|
|||
Did you try running this Vizard script on a different machine than the Perception Neuron server? It maybe an issue related to using the loopback address.
|
#3
|
|||
|
|||
No, I did not, I'll try that. Thanks
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vicon.dle error | deuce168 | Vizard | 2 | 06-03-2015 06:49 AM |
Debugger error messages in Vizard 5 | mape2k | Vizard | 1 | 12-09-2014 06:02 AM |
Polhemus FasTrak Error Message | JB_HP_Viz | Vizard | 4 | 08-15-2014 09:32 AM |
Error using CMF export from 3ds max to cal3d in some avatars | disbeat | Vizard | 4 | 04-15-2014 11:40 PM |
Polhemus Liberty Latus connecting error | Yang | Vizard | 2 | 02-13-2013 11:52 AM |