Пример #1
0
        public RaceController(Robot.Components.Robot robot)
        {
            this.robot = robot;

            this.robot.GoToRoot();

            this.steering = new WheelsControl(this.robot.GetSteeringJoystick(), this.robot.GetThrustJoystick(), 0.05f, 180);
        }
Пример #2
0
        public WeightController(Robot.Components.Robot robot)
        {
            this.robot = robot;

            var hardwareInterface = ServiceLocator.Get <IHardwareInterface>();

            this.steering = new WheelsControl(this.robot.GetSteeringJoystick(), this.robot.GetThrustJoystick());
        }
Пример #3
0
        public GateController(Robot.Components.Robot robot)
        {
            this.robot = robot;

            this.videoCapture = VideoCapture.FromCamera(0, VideoCaptureAPIs.ANY);
            this.frame        = new Mat();

            //this.robot.GetBody().GoToRoot();
            // this.robot.GetBody().GetFrontBodyPart().SetTargetHeight(100);
            // this.robot.GetBody().GetBackBodyPart().SetTargetHeight(100);

            var hardwareInterface = ServiceLocator.Get <IHardwareInterface>();

            hardwareInterface.remoteTimeoutEvent += OnRemoteTimeout;

            this.steering = new WheelsControl(this.robot.GetSteeringJoystick(), this.robot.GetThrustJoystick(), 255);
        }
Пример #4
0
        public TestController(Robot.Components.Robot robot)
        {
            this.robot = robot;

            this.steering = new WheelsControl(this.robot.GetSteeringJoystick(), this.robot.GetThrustJoystick(), 0.05f, 180);

            //this.robot.GoToRoot();
            // this.robot.GetBody().GetFrontBodyPart().SetTargetHeight(70, -30);
            // this.robot.GetBody().GetBackBodyPart().SetTargetHeight(70, -30);

            // Thread.Sleep(1000);

            // this.robot.GetBody().GetFrontBodyPart().GetLegs()[0].SetHeight(0);

            // Thread.Sleep(1000);

            // foreach (var leg in this.robot.GetBody().GetFrontBodyPart().GetLegs()) {
            //  leg.GetWheel().SetSpeed(60);
            // }

            // foreach (var leg in this.robot.GetBody().GetBackBodyPart().GetLegs()) {
            //  leg.GetWheel().SetSpeed(60);
            // }

            // Thread.Sleep(2000);

            // foreach (var leg in this.robot.GetBody().GetFrontBodyPart().GetLegs()) {
            //  leg.GetWheel().SetSpeed(0);
            // }

            // foreach (var leg in this.robot.GetBody().GetBackBodyPart().GetLegs()) {
            //  leg.GetWheel().SetSpeed(0);
            // }

            // Thread.Sleep(1000);

            // this.robot.GetBody().GetFrontBodyPart().GetLegs()[0].SetHeight(108, -30);
        }