View Single Post
  #2   Spotlight this post!  
Unread 12-11-2014, 08:28
JamieKilburn JamieKilburn is offline
Registered User
FRC #0610 (The Coyotes)
Team Role: Driver
 
Join Date: Nov 2014
Rookie Year: 2013
Location: Toronto, Ontario
Posts: 15
JamieKilburn has a spectacular aura aboutJamieKilburn has a spectacular aura about
Re: Logitech F310 Control Scheme Help

Quote:
Originally Posted by lamk View Post
Mr. Lim (Mentor of Jamie's team) called it the Kaj Drive.
"Kaj refers to Kajeevan, a long-standing and well-decorated former driver for 188 who pushed hard for this drive layout as a grade 9 driver, and used it to great effect ever since."
Here's the code written by one of his student.
Note how Mr. Lim's student decrease the midstick sensitivivty by using x^5:
Code:
//DRIVETRAIN--------------------------------------------------------------------------------------------
            
            //kaj drive (max forward and back = 90%)
            //          (max left and right = 75%)
            jagLeft.setX(-0.9 * (driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6))
                                 + 0.75 * (driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3)));
            jagRight.setX(-0.9 * (driverStick.getRawAxis(6)* driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6))
                                 - 0.75 * (driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3)* driverStick.getRawAxis(3) * driverStick.getRawAxis(3)));
https://code.google.com/p/crescent-c...svn644&r=64 4


Yep, for Kaj Drive we usually cube it to smoothen the sensitivity. Another example of it is:
Code:
  
        //Create variables for x, y, right speed and the left speed
        double rightSpeed, leftSpeed, x, y;
        //Set x and y to their axis values
        x = driver.getRawAxis(InputConstants.rightXAxis);
        y = driver.getRawAxis(InputConstants.leftYAxis);
        //Drive Smoothing

        //Set the left and rightspeed using x and y
        leftSpeed = y - x;
        rightSpeed = y + x;
        

        //Set the left and right side of the drive
        driveTrain.setLeftVBus(-leftSpeed);
        driveTrain.setRightVBus(-rightSpeed);
If you have any questions about Kaj, ask away!
Reply With Quote