Example #1
0
        public TurnToLargestDistance(IWheel wheel, ILidarDistance lidar) : base(wheel)
        {
            Details = new ExampleLogicDetails
            {
                Title    = "Turn towards greatest distance",
                Author   = "BO19E-15",
                DemoType = "Sensor update time demo",

                Description = "Uses LIDAR to detect largest distance, and turns towards it.\n" +
                              "This code does NOT utilize any gyro.\n" +
                              "Demo suggestion:\n" +
                              "Try changing collection cycles on the LIDAR page while control logic is running, and observe how this affects the vehicles ability to point towards the correct heading."
            };

            _wheels = wheel;
            _lidar  = lidar;
        }
        public DriveToLargestDistance(IWheel wheel, ILidarDistance lidar, IUltrasonic ultrasonic) : base(wheel)
        {
            Details = new ExampleLogicDetails
            {
                Title    = "Drive to largest distance",
                Author   = "BO19E-15",
                DemoType = "AUTONOMY DEMO (simple)",

                Description = "Uses LIDAR to detect largest distance, and drives towards it.\n" +
                              "It also uses Ultrasound to keep distance from wall.\n" +
                              "Will turn away from any obstructions in front.\n\n" +
                              "If lidar and collector is not running, it will be started automatically.\n" +
                              "Please note that this takes several seconds, and therefore it may take some time before the vehicle starts driving."
            };

            _wheels     = wheel;
            _lidar      = lidar;
            _ultrasonic = ultrasonic;
        }
Example #3
0
        public CrossConnectedProportionalFeedback(IWheel wheel, IUltrasonic ultrasonic) : base(wheel)
        {
            Details = new ExampleLogicDetails()
            {
                Title    = "Cross-connected P-feedback",
                Author   = "BO19E-15",
                DemoType = "P-feedback (limitation) demo",

                Description = "Simple cross-connected feedback loop between distance sensor and wheel causes the vehicle to steer away from the closest wall.\n" +
                              "The left wheel speed is controlled by the distance from the right ultrasound sensor, and vice versa for other side.\n" +
                              "When meeting obstruction in front, the car will turn (after a short pause) until no obstruction.\n" +
                              "Demo suggestion:\n" +
                              "Observe how just a simple proportional feedback kan give some limited control of the vehicle.\n" +
                              "Try sending the car at an steep angle towards the wall, and observe how it oscillates, and is unable to stay in the middle of the corridor."
            };

            _wheels     = wheel;
            _ultrasonic = ultrasonic;
        }