Holometric Drive Pseudocode?

As an off season project, I am working on a holometric drivetrain system with a mechanic on my team. A holometric drive has 4 omni wheels at 45 degree angles to a square frame and can go in any direction using vector cancellation.

I was wondering how I would compute the speeds to power the wheels at given the x and y components of the vector that indicates the desired motion of the robot.

Any ideas?

We did something along these lines just this summer! I’ll ask our programming crew leader to post here once school-day is over

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);

I think you’ll find what you are looking for here and here.

Or here, at line 00460.

BTW, the word you want is “holonomic” not “holometric”:

http://www.holonomicwheel.com/index.jsp

**