예제 #1
0
        private void button10_Click(object sender, EventArgs e)
        {
            textBox21.AppendText("Tracking started.\r\n");
            motion_tracking_controller.SetCurrentEstimationController(comboBox8.SelectedIndex);
            //start logging motion data to file
            if (!motion_tracking_controller.GetSavingMotionDataEnable())
            {
                //set filename before tracking to make sure it is saving in the right location
                optimization_motion_data_file = "motion data\\" + textBox27.Text + "-" + comboBox5.SelectedItem.ToString() + "-R" + comboBox9.SelectedItem.ToString() + "-M" + comboBox8.SelectedIndex + ".txt";
                timing_file = "timing data\\" + textBox27.Text + "-" + comboBox5.SelectedItem.ToString() + "-R" + comboBox9.SelectedItem.ToString() + "-M" + comboBox8.SelectedIndex + ".txt";
                motion_tracking_controller.SetLoggerFilename(optimization_motion_data_file, timing_file);
                motion_tracking_controller.SavingMotionDataEnable(true);
            }

            if (!motion_tracking_controller.GetTrackingEnable())
            {
                motion_tracking_controller.SetTrackingEnable(true);
            }

            motion_tracking_controller.SetBodyForEstimation();

            //enable timers
            command_position_timer.Enabled = true;

            timing_log_timer.Enabled = true;
        }