Пример #1
0
        public Ping(KUKARobot robot, ThreadSafeChart chart)
        {
            this.robot = robot;
            this.chart = chart;

            polyfitX             = new Polyfit(1);
            polyfitY             = new Polyfit(1);
            polyfitZ             = new Polyfit(2);
            predictedTimeSamples = new List <double>();

            // TUTAJ NA RAZIE NA PALE DAC TEN WEKTOR TRANZLACJI Z KUKI
            prevBallPosition = Vector <double> .Build.DenseOfArray(new double[] { 791.016, 743.144, 148.319 });

            robot.FrameReceived += ProcessRobotData;
        }
Пример #2
0
        public Ping_FlyVertically(KUKARobot robot, ThreadSafeChart chart)
        {
            this.robot = robot;
            this.chart = chart;

            robot.FrameReceived += frame => {
                if (ballHit)
                {
                    return;
                }

                if (robotMoved && robot.IsTargetPositionReached)
                {
                    ballHit = true;
                    robot.MoveTo(robot.Position, RobotVector.Zero, 1.5);
                }
            };
        }