View Single Post
  #3   Spotlight this post!  
Unread 21-02-2011, 06:15
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Holometric Drive Pseudocode?

I believe the code is exactly like Mecanum drive. We have code we use for this. The nice thing is you can modify the values to your liking. You pass in Power, Direction and Turn. We use a single joystick for this that has x, y and twist. If you look at the code you will see that the twist is returned as throttle. This is because this joystick is mapped a little differently. No big deal.

You call the Mecanum function 4 times, once for each wheel. Works very well.


You can get my 2010 code at http://www.frc272.com/seminar/Archive

Below is an example how to use them. (fbw stands for fly by wire, We read inputs and sensors into fbw variables, cook them a little and the write to outputs.)

fbw.f_LeftFrontDriveMotorPower = GetMecanumPower(LC2010::kMecanumLeftFront, fbw.f_DriverDirection, fbw.f_DriverPower, fbw.f_DriverTurn);

fbw.f_LeftRearDriveMotorPower = GetMecanumPower(LC2010::kMecanumLeftRear, fbw.f_DriverDirection, fbw.f_DriverPower, fbw.f_DriverTurn);

fbw.f_RightFrontDriveMotorPower = GetMecanumPower(LC2010::kMecanumRightFront, fbw.f_DriverDirection, fbw.f_DriverPower, fbw.f_DriverTurn);

fbw.f_RightRearDriveMotorPower = GetMecanumPower(LC2010::kMecanumRightRear, fbw.f_DriverDirection, fbw.f_DriverPower, fbw.f_DriverTurn);