示例#1
0
        private void Connect_Click(object sender, RoutedEventArgs e)
        {
            // Connet UR Secondary Port
            urSec = IURSecondaryConnection.Create(IPAddress.Text);
            var resp = urSec.Receive();

            // Connet UR RTDE port
            rtde = IURRTDEConnection.Create(IPAddress.Text);
            var np = new NegotiateProtocolVersion(rtde);

            Logging.Text += $"NegotiateProtocolVersion Accepted: { np.Accepted }";

            ControllerVersion cv = new ControllerVersion(rtde);

            Logging.Text += $"Controller Version: major { cv.Major }" +
                            $" minor { cv.Minor } bugfix { cv.Bugfix } build { cv.Build }";

            string      vars     = "timestamp,actual_TCP_pose,actual_q,runtime_state";
            SetupOutput setupOut = new SetupOutput(rtde, 125, vars);

            Logging.Text += $"Setup Output: output recipe id { setupOut.OutputRecipeId }" +
                            $" variable types { setupOut.VariableTypes }";

            var ss = new StartSending(rtde);

            rd = new ReceiveData(rtde, setupOut.VariableTypes);

            var task = new Task(() => ReceiveRTDE());

            task.Start();
        }
示例#2
0
        private void Connect_Click(object sender, RoutedEventArgs e)
        {
            dashboard = IURDashboardConnection.Create(IPAddress.Text);
            secondary = IURSecondaryConnection.Create(IPAddress.Text);

            // Connet UR RTDE port
            rtde = IURRTDEConnection.Create(IPAddress.Text);
            var np = new NegotiateProtocolVersion(rtde);
            ControllerVersion cv       = new ControllerVersion(rtde);
            string            vars     = "timestamp,actual_TCP_pose,runtime_state";
            SetupOutput       setupOut = new SetupOutput(rtde, 125, vars);
            var ss = new StartSending(rtde);

            rd = new ReceiveData(rtde, setupOut.VariableTypes);
            var taskRTDEReceiving = new Task(() => RTDEReceiving());

            taskRTDEReceiving.Start();
        }