public SaliencyModule() { var dllDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDirectory); InitializeComponent(); kinect = new KinectOne(); kinect.InitializeCamera(); kinect.OnColorFrameArrived(OnColorFrameArrived); yarpPort = new YarpPort(); yarpPort.openSender(portName); if (yarpPort != null && yarpPort.NetworkExists()) { lblYarpServer.Text = "YarpServer: runnig..."; lblYarpPort.Text = "YarpPort : " + portName; } InitSaliency(); lblStatus.Text = "running..."; }
private void InitYarp() { yarpPort = new YarpPort(); yarpPort.openSender(ConfigurationManager.AppSettings["LeapSender"].ToString()); checkStatus = new System.Timers.Timer(); checkStatus.Elapsed += new ElapsedEventHandler(CheckYarpLeap); checkStatus.Interval = 5000; checkStatus.Start(); }
public void ThreadPoolCallback(Object outputYarpPort) { YarpPort outYarpPort = (YarpPort)outputYarpPort; byte[] serializedFrameByte = _frame.Serialize; string serialiedFrameString = Convert.ToBase64String(serializedFrameByte); outYarpPort.sendData(serialiedFrameString); _doneEvent.Set(); }
private void InitYarp() { yarpPortHands = new YarpPort(); yarpPortHands.openReceiver(ConfigurationManager.AppSettings["HandsSender"].ToString(), ConfigurationManager.AppSettings["HandsReceiver"]); yarpPortPosture = new YarpPort(); yarpPortPosture.openReceiver(ConfigurationManager.AppSettings["PostureSender"].ToString(), ConfigurationManager.AppSettings["PostureReceiver"]); yarpPortGesture = new YarpPort(); yarpPortGesture.openReceiver(ConfigurationManager.AppSettings["GestureSender"].ToString(), ConfigurationManager.AppSettings["GestureReceiver"]); checkStatus = new System.Timers.Timer(); checkStatus.Elapsed += new ElapsedEventHandler(CheckYarp); checkStatus.Interval = 5000; checkStatus.Start(); }
public ShoreModule() { var dllDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDirectory); InitializeComponent(); if (File.Exists(dllDirectory + "\\Shore140.dll")) { kinect = new KinectOne(); kinect.InitializeCamera(); kinect.OnColorFrameArrived(OnColorFrameArrived); yarpPort = new YarpPort(); yarpPort.openSender(portName); if (yarpPort != null && yarpPort.NetworkExists()) { lblYarpServer.Text = "YarpServer: runnig..."; lblYarpPort.Text = "YarPort: " + portName; } InitShoreEngine(); lblStatus.Text = "running..."; } else { lblStatus.Text = "No Library SHORE"; lblYarpServer.Text = "YarpServer:"; } //senderYarp = new System.Threading.Thread(SendData); //senderYarp.Start(); }
private void InitYarp() { yarpPortScene = new YarpPort(); yarpPortScene.openSender(subjectRecognized_OUT); yarpPortCommandDB = new YarpPort(); // yarpPortCommandDB.openSender("/RecognizedModule/Command:o"); yarpPortReplyDB = new YarpPort(); //yarpPortReplyDB.openInputPort("/RecognizedModule/Reply:i"); yarpPortStatusDB = new YarpPort(); yarpPortStatusDB.openReceiver(dataBaseStatus_OUT, dataBaseStatus_IN); senderThread = new System.Threading.Thread(SendData); senderThread.Start(); checkYarpStatusTimer = new System.Timers.Timer(); checkYarpStatusTimer.Elapsed += new ElapsedEventHandler(CheckYarpConnections); checkYarpStatusTimer.Interval = (1000) * 5; checkYarpStatusTimer.Start(); }