Exemplo n.º 1
0
        private void InitDrive()
        {
            IDifferentialMotorController dmc = hardwareBrick.produceDifferentialMotorController();

            driveController = new DifferentialDrive(hardwareBrick)
            {
                wheelRadiusMeters           = WHEEL_RADIUS_METERS,
                wheelBaseMeters             = WHEEL_BASE_METERS,
                encoderTicksPerRevolution   = ENCODER_TICKS_PER_REVOLUTION,
                speedToVelocityFactor       = SPEED_TO_VELOCITY_FACTOR,
                turnToOmegaFactor           = TURN_TO_OMEGA_FACTOR,
                differentialMotorController = dmc
            };

            driveGeometry = (IDifferentialDrive)driveController;

            driveController.Init();
            driveController.Enabled = true;
        }
Exemplo n.º 2
0
        private void InitDrive()
        {
            IDifferentialMotorController dmc = hardwareBrick.produceDifferentialMotorController();

            driveController = new DifferentialDrive(hardwareBrick)
            {
                wheelRadiusMeters           = WHEEL_RADIUS_METERS,
                wheelBaseMeters             = WHEEL_BASE_METERS,
                encoderTicksPerRevolution   = ENCODER_TICKS_PER_REVOLUTION,
                speedToVelocityFactor       = SPEED_TO_VELOCITY_FACTOR,
                turnToOmegaFactor           = TURN_TO_OMEGA_FACTOR,
                differentialMotorController = dmc
            };

            this.odometry = hardwareBrick.produceOdometry(ODOMETRY_SAMPLING_INTERVAL_MS);

            this.odometry.OdometryChanged += ((SensorsControllerPlucky)sensorsController).ArduinoBrickOdometryChanged;

            driveController.hardwareBrickOdometry = odometry;
            driveGeometry = (IDifferentialDrive)driveController;

            driveController.Init();
            driveController.Enabled = true;
        }
Exemplo n.º 3
0
        private void InitDrive()
        {
            IDifferentialMotorController dmc = produceDifferentialMotorController();

            IDifferentialDrive ddc = new DifferentialDrive(hardwareBrick)
            {
                wheelRadiusMeters = WHEEL_RADIUS_METERS,
                wheelBaseMeters = WHEEL_BASE_METERS,
                encoderTicksPerRevolution = ENCODER_TICKS_PER_REVOLUTION,
                speedToVelocityFactor = SPEED_TO_VELOCITY_FACTOR,
                turnToOmegaFactor = TURN_TO_OMEGA_FACTOR,
                differentialMotorController = dmc
            };

            driveController = ddc;
            driveGeometry = ddc;

            driveController.Init();
        }
Exemplo n.º 4
0
        private void InitDrive()
        {
            IDifferentialMotorController dmc = hardwareBrick.produceDifferentialMotorController();

            driveController = new DifferentialDrive(hardwareBrick)
            {
                wheelRadiusMeters = WHEEL_RADIUS_METERS,
                wheelBaseMeters = WHEEL_BASE_METERS,
                encoderTicksPerRevolution = ENCODER_TICKS_PER_REVOLUTION,
                speedToVelocityFactor = SPEED_TO_VELOCITY_FACTOR,
                turnToOmegaFactor = TURN_TO_OMEGA_FACTOR,
                differentialMotorController = dmc
            };

            this.odometry = hardwareBrick.produceOdometry(ODOMETRY_SAMPLING_INTERVAL_MS);

            this.odometry.OdometryChanged += ((SensorsControllerPlucky)sensorsController).ArduinoBrickOdometryChanged;

            this.gps = hardwareBrick.produceGps(GPS_SAMPLING_INTERVAL_MS);

            this.gps.GpsPositionChanged += ((SensorsControllerPlucky)sensorsController).ArduinoBrickGpsChanged;
            this.gps.Enabled = true;

            driveController.hardwareBrickOdometry = odometry;
            driveGeometry = (IDifferentialDrive)driveController;

            driveController.Init();
            driveController.Enabled = true;
        }