Quote:
Originally Posted by lamk
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!