The Vexmen of Brandywine Robotics

Blog Post

What’s Your Robot Drive Style?

Now that everyone’s started building, we have quite a few different designs going for drive styles on the robots.

This will take a few posts to describe everything, so today we’ll talk about two wheel drive versus four wheel drive on a regular square robot then go into tank and arcade style drives.

The motors turn the wheels which move the robot. Where you put those motors have some effects on the drive style of the robot. We’ll go over different wheel and motor configurations and how you can have the joysticks drive these robots in different ways. Once we go over the square robot designs, we’ll cover the holonomic and U shapes some teams have going on.

Four Wheel Drive Square Robot

Here’s a four wheel drive square robot with sticky wheels on the back and omni wheels on the front. Since your robots don’t have a steering mechanism like a car, the omni wheels allow the robot to turn without having the wheels skip along the floor. They’re not perfect spheres allowing movement in any direction, but they help a lot in turning your robots.

[spacer size=”5″]
This picture shows the robot with some arrows to show the force that wheel is driving the robot and the direction is it moving the robot. This moves the robot along. How much power you give each wheel determines how your robot will move.

In the four wheel drive robot, you will get torque to each wheel to drive it. If you want to push someone around, having force in each wheel is a good defense. If you think about a NASCAR car’s bump and run technique, you can spin out a robot by pushing the undriven corner. So depending upon game play and how you are positioning yourself, you may want motors all around.

The downside of four wheel drive is the front wheels can’t float their way into feeling a goal. The four wheel drive makes the robot turn on its center versus turning in the back. The principle to learn about this is the center of rotation which we’ll talk about after looking at the two wheel drive robots.
[spacer size=”5″]

Two Wheel Drive Square Robot

In this robot, only the back wheels are driven. this only shows two motors, but you can gear or chain together a few motors on each side to add extra driving power. It won’t give extra top speed since the motors only go so fast, but the added torque can get you to your top speed a bit sooner than just two motors.

The advantage of the two wheel drive is that you don’t have to leave space for motors up front and can make the axle length of the front wheels a bit narrower for your grabber or intake. The front looseness in steering can help hone your robot around a scoring ring with the help of a guide.

[spacer size=”5″]

Center of Rotation

So the imaginary pivot point of your robot is called the center of rotation. To find the center of rotation, we need to see the forces being applied on the wheels and find where they meet. Luckily we’ll apply similar forces on the wheels so the math can become pretty easy.

On this four wheel drive robot when you drive the wheels exactly the same forwards and backwards, the center of rotation is about the point where you draw and X through the contact points of the four tires. It varies a little bit because your wheels are not all equal with those omni wheels so the center of rotation will be a touch forward of that X. You can either do a whole bunch of math to figure out that exact point, or you can use a marker or two and spin the robot while driving it on a big piece of paper. (And that then is a real good spot to put your line tracker sensors)
[spacer size=”5″]

So here is the difference in two wheel drive and four wheel drives. In the two wheel drive robot the rear motors are the only driven wheels and the front omni wheels are rolling along with little resistance. So when you draw a line between the two contact points on the two wheel drive, the center of rotation is nearly along that back line between the rear wheels. Where it varies is on how much power you give to each wheel.

The center of rotation can move all that way to one of the rear wheels if you apply no force on that wheel. So the left or right rear wheel is now the center of rotation. Last year, 23-A Phoenix (now 80X: X-23) used a clamp to ensure that rear wheel stayed put while they turned. You line follower is now on an arc and you’ll have to account for that.
[spacer size=”5″]

Drive Styles

So now on to drive styles of your robot. It will vary a bit based upon the style of robot.

Tank Drive – two joysticks

The tank drive is the easiest to program. Basically you have the left joystick up and down channel control the left side motors and the right joystick up and down control the right side motors. It takes some practice to get your driving evenly set between the left and right sticks for turns. The vex Wiki has some sample code for you.

Some variations on the tank drive have been done to make the joystick less responsive for giving fine control. Some easier means are to divide the channel in half. But then you have to switch between half and full power. Some more complex means are to apply a logarithmic function to give fine control near the center while allowing full power at the full throttle. This can be applied to other drive styles but is easiest to give predictable range using the tank style.
[spacer size=”5″]

Arcade Drive – one joystick

The arcade style uses the joystick to steer the robot in the direction you move the stick. If you look at the sample code on the vex wiki, it has you divide the x and y by two and add them together. This allows you to keep all the controls within the 127 boundaries, The only problem with this is all the way up on the y axis will result in only moving forward at half power.

When you’re all the way forward with x=0, and y=127 the resulting force to the motor would only by 63 (it’s integer math most likely). If you are all the way in the top right with x=127 & y=127, then one side would be at 127 and the other side would be 63 at 0. If you are all the way right with x=127 & y=0, then one side would be at 63 and the -63 turning you in a tight circle in place.

If you remove the division by two and limit the values to +-127 range, you will have less control as the values get big much faster. So think of some proportional way to control the range and program that if you want the full forward speed in arcade drive.
[spacer size=”5″]

Holonomic Drives

We have not talked about holonomic omnidirectionally driven robots yet, but they have two flavors.

  • 45 degree offset version in an X formation.

  • no offset version in a Plus formation

The X formation has wheels going in opposite directions to drive straight. It’s a bit less efficient than the robots described above but it has one huge advantage – you can move the robot precisely in X and Y coordinates. It also has a spin control.
[spacer size=”5″]

Here’s the basic code for holonomic X taken from this extremely long post on the Vex forums:
[note color=”#FFCC00″]
xone = vexRT[Ch3];
yone = vexRT[Ch4];
rot = vexRT[Ch1];

m1 = yone + -1*xone + -1*rot;
m2 = -1*yone + -1*xone + -1*rot;
m3 = -1*yone + xone + -1*rot;
m4 = yone + xone + -1*rot;
For the plus holonomic, it’s a bit easier to program. The wheels going left/right are the X axis channel and the forward back is the Y axis channel. You can do the rotational addition to it like the holonomic X program.

Other holonomic drives

Last drives we’ll show here.

  • U Drive

  • H drive

These are really variations on the plus holonomic in that the cross wheels are in the back of the robot. The H is a bit more stable than the U drive in that you can go left/right a little more predictably. Using these drives it is preferrable to use omni wheels all around to prevent any stopping.
[spacer size=”5″]

The U drive has another variation that you can have the back end sweep about. So instead of running the front motors, you can sweep the back about to help turn.
[spacer size=”5″]

Then there’s a crazy variation being built by 81A right now. They have the rear wheels of the U on a 45 degree slant like it was the back half of a holonomic X. A modified arcade style drive may be the best way to deal with that challenge and add the rotation to the rear wheels.