Holonomic

I’ve been brainstorming about a 4 wheeled holonomic but I can’t wrap my head around how one maps the wheels to the joysticks.

What would be the easiest transition from having used a tank drive for the past two years? I’m not the most delicate driver, mostly shoving the joysticks forward without worrying about the x-axis too much…

Good question. If you are having two drivers for your robot, one for the drive and the other for the lift/intake, a good thing to do for the drive is to have a normal tank drive, and then put the sidewards movement on the shoulder buttons (left shoulder button to strafe left and right button to strafe right).

If you are the only driver for your robot, it becomes a little harder, because the face buttons on the joystick are pretty impractical for use in competition, and the shoulder buttons are probably all used. In this case you will have to put the strafe as horizontal of one of the joysticks (or take the average of both joysticks, which is what I did when I had a holonomic robot). A way to limit accidental strafing movement is to put very large “dead-zones” on the x axis of the thumbstick (ie. If the thumbstick value is 0 +/- 25 or so, set the strafe to 0). You could start with that deadzone as VERY large at first ~50 while you are getting used to it, and then when you start becoming more delicate with the joystick, slowly decrease the deadzone.

Seems like we had the same thing in mind!

In regards to mapping the tank drive, is essentially the same theory as if the wheels were parallel?

Without swapping to arcade, what other ways besides using the trigger buttons could I do to move diagonally?

Many thanks,
Timothy Leung

If you map the basic “tank drive” to the y-axes, and the strafing to the x-axes, it should be able to go at angles without any extra work. If you set strafing to the shoulder buttons, you should be able to do 45 degree angles (full forward/backward + strafe) and anything lower than that if you’re not driving forward at full speed.

I’m assuming you’re using the omni wheels, and not the mecanum wheels? Cody did a great tutorial a while back: http://polynomic3d.com/user/smith/holonomic.php

There are many ways you can accomplish this task. Ours if a bit complicated but here is a simple bit of code that will get you started

{
int stk_y;
int stk_x;
do
{
stk_y = vexRT(ch3);
stk_x = vexRT(ch4);

``````motor[frontLeft] = stk_y + stk_x;
motor[frontRight] = -stk_y + stk_x;
motor[frontLeft] = stk_y + stk_x;
motor[frontRight] = -stk_y - stk_x;
``````

}while(1=1)

Hopefully you understand what I did here, you will have to do some tweaking to make it work for your specific circumstances. If you would like to try some more complex code I can show you what we use, but it takes some tough math to understand.

Do you use EasyC or ROBOTC? If EasyC v4, there is a command for X-Holonomic which shows you how to configure the motors and maps the joystick to control those motors. The right stick shifts the robot up/down/left/right, as well as strafing in any diagonal direction you want. The left stick causes spin.

It takes a lot of the work (and fun) out of programming yourself, but it’s a fast way to get “up and running”.

1 Like