public DiagnosticsPage()
        {
            this.InitializeComponent();

            CoordinateHelper.Initialize(mainCanvas.Width, mainCanvas.Height);

            pixyCam = new PixyCam();
            robot = new Robot();

            // Initialize robot's max speed and acceleration
            robot.StepperX.MaxSpeed = Config.MOTOR_X_MAX_SPEED;
            robot.StepperY.MaxSpeed = Config.MOTOR_Y_MAX_SPEED;

            robot.StepperX.Acceleration = Config.MOTOR_X_ACCELERATION;
            robot.StepperY.Acceleration = Config.MOTOR_Y_ACCELERATION;

            // Adds event listeners for when a goal is scored
            robot.HumanGoalSensorTriggered += Robot_HumanGoalSensorTriggered;
            robot.RobotGoalSensorTriggered += Robot_RobotGoalSensorTriggered;

            initializeUI();
        }
示例#2
0
 public AIHelper(Robot robotEntity)
 {
     robot = robotEntity;
     com = new CenterOfMass();
     previousTrajectoryPoint = CoordinateHelper.INVALID_POINT;
 }