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); }
public WeightController(Robot.Components.Robot robot) { this.robot = robot; var hardwareInterface = ServiceLocator.Get <IHardwareInterface>(); this.steering = new WheelsControl(this.robot.GetSteeringJoystick(), this.robot.GetThrustJoystick()); }
public DanceController(Robot.Components.Robot robot) { this.robot = robot; Console.WriteLine("3"); Console.Beep(); Thread.Sleep(1000); Console.WriteLine("2"); Console.Beep(); Thread.Sleep(1000); Console.WriteLine("1"); Console.Beep(); Thread.Sleep(1000); Console.WriteLine("0"); Console.Beep(); }
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); }
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); }
public TrackingController(Robot.Components.Robot robot) { this.robot = robot; this.videoCapture = VideoCapture.FromCamera(0, VideoCaptureAPIs.ANY); this.videoCapture.Set(VideoCaptureProperties.BufferSize, 1); this.frame = new Mat(); //this.robot.GetBody().GoToRoot(); this.virtualWindow = new VirtualWindow.VirtualWindow(this.frame); //ServiceLocator.Get<VirtualWindowHost>().AddVirtualWindow(this.virtualWindow); this.robot.GetBody().GetFrontBodyPart().GetLegs()[0].GetWheel().SetSpeed((int)-40); this.robot.GetBody().GetFrontBodyPart().GetLegs()[1].GetWheel().SetSpeed((int)-40); this.robot.GetBody().GetBackBodyPart().GetLegs()[0].GetWheel().SetSpeed((int)-40); this.robot.GetBody().GetBackBodyPart().GetLegs()[1].GetWheel().SetSpeed((int)-40); Thread.Sleep(1700); this.robot.GetBody().GetFrontBodyPart().GetLegs()[0].GetWheel().SetSpeed((int)0); this.robot.GetBody().GetFrontBodyPart().GetLegs()[1].GetWheel().SetSpeed((int)0); this.robot.GetBody().GetBackBodyPart().GetLegs()[0].GetWheel().SetSpeed((int)0); this.robot.GetBody().GetBackBodyPart().GetLegs()[1].GetWheel().SetSpeed((int)0); }