Modkit for iPad to allow 4 omni wheels on drive base

Huge Modkit on iPad fan. Last night a team was trying to set up the drive base with 4 omni wheels. The go into the base setup click front wheel type select omni. Go to rear wheels, select omni, front wheels change to 200mm. Go back to front wheels, select omni, rear wheels change to 200mm. It does this with both connected and unconnected sides. Not a big deal, but a strange experience.

Related to that, I was wondering the logic behind how it calculated the left and right turns based on the wheels, wheelbase and width. Roboteers thought it was magical that the brain knew how to turn, but I know there is algorithms in play. Can that be shared?

Would be interesting to see what the actual calculations were but my hunch would be that we won’t be seeing that.
It’s fun to get students to play with the variables though and see what effect it has. Track is probably the easiest to visualise as you can instantly see the effect of a smaller or larger diameter circle and how far the wheels have to travel.

current angle is usually (left encoder - right encoder) / wheel base width. (and repeated very quickly based on the change in encoders)
S = r * theta, so theta = S / r. Similarly, given angle, you can find the delta that a motor should run for until .
if you want to turn with one side of the drive base not moving, S is equal to the encoder count converted to some linear unit like inches, theta is the angle (remember to convert to radians) you wish to turn to, and r is (in the same units as S) the wheel base width.

If you want to turn with both sides of the drive, r is the wheel base width / 2, and you just tell the left side to go the right motor’s target * -1, where S becomes the target.

Pretty simple, it’s also how okapilib’s chassis controller turns using the internal smart motor pid.