// Constructor CalibrationClient(HoloDataClient holoDataClient, NatNetClient natNetClient) { logStartTime_ = System.DateTime.Now; outputFile_ = outputFile_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; WriteToLog("# hl_pos_x,hl_pos_y,hl_pos_z,hl_rot_w,hl_rot_x,hl_rot_y,hl_rot_z,rb_pos_x,rb_pos_y,rb_pos_z,rb_rot_w,rb_rot_x,rb_rot_y,rb_rot_z,timestamp"); outputFile1_ = outputFile1_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; outputFile2_ = outputFile2_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; // Create the MATLAB instance matlab_ = new MLApp.MLApp(); // Change to the directory where the function is located string startupPath = Environment.CurrentDirectory; string pathCmd = string.Format("cd {0}\\..\\..", startupPath); matlab_.Execute(pathCmd); holoDataClient_ = holoDataClient; natNetClient_ = natNetClient; holoDataClient_.StartFetchLoop(2000); holoDataClient_.OnPoseUpdate = PoseDataReceived; nnStartFetchLoop(20); }
public void InterpretMessage(string messageString) { logStartTime_ = System.DateTime.Now; outputFile_ = outputFile_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; WriteToLog("# hl_pos_x,hl_pos_y,hl_pos_z,hl_rot_w,hl_rot_x,hl_rot_y,hl_rot_z,rb_pos_x,rb_pos_y,rb_pos_z,rb_rot_w,rb_rot_x,rb_rot_y,rb_rot_z,timestamp"); outputFile1_ = outputFile1_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; outputFile2_ = outputFile2_ + logStartTime_.ToString("_yyMMdd_hhmmss") + ".csv"; holoDataClient_.StartFetchLoop(2000); holoDataClient_.OnPoseUpdate = PoseDataReceived; nnStartFetchLoop(20, messageString); return; }
// Constructor CalibrationClient(HoloDataClient holoDataClient, NatNetClient natNetClient, bool requireSpaces) { requireSpaces_ = requireSpaces; phraseList_ = ImportPhraseList("phrase-list.txt"); // Create the MATLAB instance matlab_ = new MLApp.MLApp(); // Change to the directory where the function is located string startupPath = Environment.CurrentDirectory; string pathCmd = string.Format("cd {0}\\..\\..", startupPath); matlab_.Execute(pathCmd); holoDataClient_ = holoDataClient; natNetClient_ = natNetClient; // Start fetch loop for HL pose data (every 2s) holoDataClient_.StartFetchLoop(2000); holoDataClient_.OnPoseUpdate = PoseDataReceived; }