![]() |
Kaj Drive in c++?
I've seen quite a bit of posts talking about 2 stick arcade drive or kaj drive. With this method, 1 stick controls the rotation of the robot, and the other controls the throttle of the robot *or thumb pads in the case of a controller* . I'm not sure how to implement this in c++ and would love some help setting this up.
|
Re: Kaj Drive in c++?
This is what my team has done for the last few years now. It can be done with one line of code that is built in to the RobotDrive class in wpilib.
Code:
yourRobotDriveobject.ArcadeDrive(joystick.getRawAxis(forwardaxis), joystick.getRawAxis(rotateaxis)); |
Re: Kaj Drive in c++?
While that method should work for a single joystick, it doesn't appear to work if using 2 stick arcade or Kaj drive. Any idea if changing arcade drive in the robotdrive header file could fix this?
|
Re: Kaj Drive in c++?
I think this is roughly what you're looking for
Code:
float speed = throttleStick->GetY(); |
Re: Kaj Drive in c++?
Quote:
Quote:
Code:
void ArcadeDrive(float moveValue, float rotateValue, bool squaredInputs = true); |
Re: Kaj Drive in c++?
Quote:
|
Re: Kaj Drive in c++?
Thanks for all the help! I won't be able to work on the robot until monday, but when I do, you can bet I'll implement this!
|
| All times are GMT -5. The time now is 12:09. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi