Go to Post If you spend the money on a new stadium, you might make a profit. If you spend the money on upgrading school lab facilities, you might inspire someone to make a vaccine for HIV. - nathanww [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 11-12-2014, 08:28 AM
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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:35 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi