|
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.
|