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