Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Holonomic Drive WPILIBJ Support (http://www.chiefdelphi.com/forums/showthread.php?t=153502)

abigailthefox 11-01-2017 22:15

Holonomic Drive WPILIBJ Support
 
My team has decided to go with a holonomic drivetrain this year, specifically four omni wheels mounted in the corners of the base, at 45 degree angles.
I am the lead programmer for our team, but I have not previously worked on programming a drivetrain with omni wheels (I am also one of only two veterans on the programming sub team, and the other also does not have experience with this).
I saw on another thread (from several years ago) a note about using the mecanumDrive_Cartesian method in the WPILIBJ to control a holonomic drive similar to the one we are using. However, the poster only mentioned that the wheels were at 45 degree angles, and although the OP was talking about omni wheels and I have never heard of someone mounting mecum wheels at 45 degree angles to the base, I wondered if anyone had experience with/has used this method with a holonomic omni drive like I have described.
If it doesn't work, I would also be interested in some pointers on working out the math for this myself, and where to start.

MuskieProgramme 12-01-2017 08:53

Re: Holonomic Drive WPILIBJ Support
 
I am new to WPILIB so there may be a better way, but I have created a holonomic drive in FIRST Tech Challenge.

You have two joystick inputs (x and y)
You have four outputs (a, b, c, and d) arranged like so:
a b
c d

The formula will look something like this:

a = y + x
b = -y + x
c = y - x
d = -y - x

...assuming that positive power to each rotates the robot clockwise.

This isn't the "ideal" formula for holonomic driving - I have since moved on to something better at scaling. However, it is the simplest to understand and easiest to implement. If you want to understand the logic behind it, draw each wheel as a force vector, with a proposed direction. Cancel any opposing force and you can see how this particular formula works.

Ether 12-01-2017 09:02

Re: Holonomic Drive WPILIBJ Support
 
Quote:

Originally Posted by abigailthefox (Post 1629698)
My team has decided to go with a holonomic drivetrain this year, specifically four omni wheels mounted in the corners of the base, at 45 degree angles.

I saw on another thread (from several years ago) a note about using the mecanumDrive_Cartesian method in the WPILIBJ to control a holonomic drive similar to the one we are using.

Yes, the mecanum method in WPILib will work with the omni drive you described above.

What gear ratio (from motor to wheel) are you planning to use?

What diameter omni wheels?




abigailthefox 12-01-2017 12:21

Re: Holonomic Drive WPILIBJ Support
 
Quote:

Originally Posted by Ether (Post 1629818)
What gear ratio (from motor to wheel) are you planning to use?


I don't know yet, we're between a few options.

Quote:

Originally Posted by Ether (Post 1629818)
What diameter omni wheels?


6" omni wheels.

Ether 12-01-2017 13:14

Re: Holonomic Drive WPILIBJ Support
 
Quote:

Originally Posted by abigailthefox (Post 1629973)
I don't know yet, we're between a few options.

6" omni wheels.

Well, whatever you choose, do yourself a big favor and choose based on doing some math.

If you need help, ask. There are lots of easy-to-use drivetrain spreadsheets available.




All times are GMT -5. The time now is 12:33.

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