示例#1
0
 public PathFollower()
 {
     pid = new PID();
     pathfollower = new Thread(pathRunner);
     angular = new PID();
     cal = new Calculation();
 }
示例#2
0
 public GoalKee(int index__,double goalX)
 {
     index = index__;
     cal = new Calculation();
     goalkeyX = new double();
     goalKeyY = new double();
     goalkeyX = goalX;
     distance = new double[2];
 }
 public ObstacleTrejectory()
 {
     Totaldistance = new double();
     angle = new double();
     XCC = new Stack();
     YCC = new Stack();
      //           Angle = new Queue();
        //         Point_distance = new Queue();
     cal = new Calculation();
 }
示例#4
0
 public strategic(int goalkeePosition)
 {
     //    X = new double[8] { -1000,-800,-500,-200,-100, 100,500,1000  };
       //  Y = new double[8] { 500, 500, 500, 500, 500, 500, 500, 500};
     RobotX = new double();
     RobotY = new double();
     cal = new Calculation();
     myGoalKee = goalkeePosition;
     targetGoal = -goalkeePosition;
     kicking = new Skills();
 }
示例#5
0
        public FeedBack()
        {
            sock.JoinMulticastGroup(IPAddress.Parse("224.5.23.2"), 50);
             iep =  new IPEndPoint(IPAddress.Any, 0);
            c_radius = new int();
            a = new int();
            BluerobotID = new double[noOfRobot]; BluerobotX = new double[noOfRobot]; BluerobotY = new double[noOfRobot];
            ///////////////////////////////////
            YellowrobotID = new double[noOfRobot]; YellowrobotX = new double[noOfRobot]; YellowrobotY = new double[noOfRobot];
            ////////////////////////////////////
            R2R_distance = new double[noOfRobot];   speed = new int[noOfRobot];
            /////////////////////////////////////////
              BluerobotOrient = new double[noOfRobot];Bluedistance = new double[noOfRobot]; Blueangle = new double[noOfRobot];
            Blueorient_Ball = new double[noOfRobot];
            Blueorient_Goal = new double[noOfRobot];
            //////////////////////////////////////////
            YellowrobotOrient = new double[noOfRobot]; Yellowdistance = new double[noOfRobot]; Yellowangle = new double[noOfRobot];
            Yelloworient_Ball = new double[noOfRobot];
            Yelloworient_Goal = new double[noOfRobot];

            /////////////////////////////////////////
            calc = new Calculation();

            Controller = new Control(noOfRobot,Striker,Goalkee,Mybotblue, noOfRobotBlue,noOfRobotYellow, goalkeyPositonX);
            kalmanballX = new KalmanFilter();
            KalmanBally = new KalmanFilter();

            KalmanThread = new Thread(kalmanrunning);

            FilterBlueX0 = new KalmanNoiseFilter();
            FilterBlueX1 = new KalmanNoiseFilter();
            FilterBlue0Orient = new KalmanNoiseFilter();

            FilterBlueY0 = new KalmanNoiseFilter();
            FilterBlueY1 = new KalmanNoiseFilter();
            FilterBlue1Orient = new KalmanNoiseFilter();

            FilterYellowX0 = new KalmanNoiseFilter();
            FilterYellowX1 = new KalmanNoiseFilter();
            FilterYellow1Orient = new KalmanNoiseFilter();

            FilterYellowY0 = new KalmanNoiseFilter();
            FilterYellowY1 = new KalmanNoiseFilter();
            FilterYellow0Orient = new KalmanNoiseFilter();
        }
示例#6
0
        public Control(int noofbots,int striker,int goalkey,int team,int noOfBlueRobot, int noOfYellowRobot,int myGoalkeyPosition)
        {
            blueRobotX = new double[noOfBlueRobot];
            blueRobotY = new double[noOfBlueRobot];
            blueRobotOrient = new double[noOfBlueRobot];
            yellowRobotX = new double[noOfYellowRobot];
            yellowRobotY = new double[noOfYellowRobot];
            yellowRobotOrient = new double[noOfYellowRobot];
            Striker = striker;
            Goalkey = goalkey;
            Blueteam = team;
            goaler = new GoalKee(goalkey,myGoalkeyPosition);
            Strategic = new strategic(myGoalkeyPosition );

            cal = new Calculation();
            StrikerPlan = new PathPlanner(noofbots, striker,  team,goalkey, noOfBlueRobot, noOfYellowRobot,(-myGoalkeyPosition));
            GoalkeePlan = new PathPlanner(noofbots, goalkey, team,goalkey, noOfBlueRobot, noOfYellowRobot,(-myGoalkeyPosition));
        }
示例#7
0
        public PathPlanning()
        {
            changepath = new int();
            FinalDistance = new double();
            FinalAngle = new double();
            cal = new Calculation();
            pid =new PID();
            Newpath = new ObstacleTrejectory();
            changepath = 1;
            Rob_P_dist = new double();
            index = new int();
            pathcomplete = 1;
            x = new int[360];
            y = new int[360];

            for (int i=0; i<360;i++)
            {
                x[i] =(int) (-1700 + 800 * Math.Cos((i+180) * Math.PI / 180));
                y[i] = (int)(0 + 800 * Math.Sin((i+180) * Math.PI / 180));
            }
        }