Commonly asked questions. (New teams look here!)

Question: How do I make my robot drive the way I want in autonomous mode?
Answer: This is one of the most non obvious and intricate questions there is in Vex. How do I make my robot drive the way I want? After participating in over 20 competitions over the course of many years, I have concluded that the best approach is a gyro + an encoder wheel + PID control. I’m going to break these down one by one to explain how to make your robot drive the way you want in autonomous mode.

Gyro: This sensor tracks rotation along an axis. It is notorious for drift, but mounting it on green rubber links or friction pad can greatly reduce this problem. The gyro is the most direct and one of the most accurate sensors there is, and it has precision down to a 10th of a degree. By using PID control in conjunction with the gyro, you can achieve very precise and consistent turning regardless of battery voltage.

Encoder wheel: This is a high precision method of tracking your forwards and backwards position. The wheels on your robot most likely skid when you come to a stop or temporarily lift off the ground when the robot rocks, but an encoder wheel does not skid or rock. To build an encoder wheel, you should mount a small wheel on a shaft that goes through a red encoder, and then put this assembly on a screw joint and rubber band it downwards. Ideally, the encoder wheel would be at the center of your robot, but moving it towards the front or back as long as it remains centered from side to side is not a problem. This way, if the robot lifts off the ground a fraction of an inch, the rubber bands will continue to push the wheel into the ground, preventing any loss of accuracy. And, because this wheel is not driven, it never skids.

PID Control: This is probably the most intricate part of the process. However, without at least P or PI control, you will lose critical accuracy. To implement P, PI, or PID control, see the various resources on the forums and Wikipedia. The scope of this post is simply how to integrate a gyro and an encoder wheel into PID control once you know the basics. Essentially, you should create 2 separate variables: the desired drive (forwards and backwards) value and the desired turn (left and right) value. You can set these in 1 function with something like this:
void setDrive(int drive, int turn){
desiredTurn = desiredTurn + turn;
desiredDrive = desiredDrive + drive;
}

And to set the drive- say you want 1000 tics forward with no turning- you would say

setDrive(1000, 0);

By setting the new value to the old value plus whatever your target value is, you ensure that any error from the previous step will be corrected in the next step. Then, in your PID loop, you should calculate the forward speed based on the desiredDrive error, the turn speed based on the desiredTurn error, and set the motors based on these values. To set the motors based on these values, you should set one side of the drive to the drive speed plus the turn speed and the other side to the drive speed minus the turn speed. For example, if your drive speed is 50 and your turn speed is 70, one side of the drive base would go at speed 120 while the other went at -20. This would yield both forwards backwards and side to side movement in the intended direction.

I hope this post helps at least one person achieve an accurate autonomous mode driving program.

Hello our robot team is from Cork in Ireland and we are unsure about a few things.

  1. We are wondering whether or not we will be given a stall at the competition for our PR team
  2. Is there a skills challenge game during the competition in which we have to compete in
  3. What are we judged on. Is the engineering notebook needed and if not then what is
    Thanks any replies would be greatly appreciated as this is our first time and we need a better idea of whats going to happen when we get there

At most events, teams are given a table or stall or something, but this is usually pretty small

Yes, most events offer skills throughout qualifications, but be sure to check RobotEvents

Engineering Notebooks aren’t required per se, but they are certainly reccomended. Take a look at this rubric

How can i make suspension i am just exsperimenting with cool things to use that might be useful in a future
comp cause we are out an ideas

You could mount the drive motors and wheels to a c-channel that pivots in the middle of the chassis and has rubber bands to keep it in its center position

Anyways, to get this thread back on topic…

Question: Why isn’t my lift lifting like I want it to?
Answer: There are several potential causes of this. Many Teams I have seen with lifts that don’t lift smoothly are lacking in one of the following areas:
-Rubber bands (or rather the lack thereof): If you have a lift of any type, rubber bands are always a good idea. The purpose of rubber bands is to make it so the motors only have to control the inertia of the lift, and not the actual weight of the lift. A well rubber banded lift will be able to hold itself at any position without any motor input. For a DR4B, usually the best way to rubber band is in a triangle. Here are some useful links regarding rubber banding: (credit to @antichamber )

https://scratch.mit.edu/projects/165255545/#player
Here is an example of a perfectly rubber banded lift:

Any lift can be rubber banded, and a good way to test if the rubber banding is good, is to disconnect the motor shafts from the lift, and see if the rubber bands will hold the lift at every position. If not, you have work to do.
-Excess friction: A major cause of lift failure is excess friction. Friction is unavoidable, however you want to minimize it as much as possible. Use screw joints to reduce friction and slop in a lift. In this post , @Anomaly described how to use screw joints.
-Inadequate bracing: If one side of the lift is going up differently than the other, consider adding bracing to synchronize the two sides of the lift. X-shaped bracing is usually the best for this purpose.
-Excess weight: I have seen teams who use rubber bands well, and their lift is still slow. The reason in this case was the lift was simply too heavy. Due to rubber bands, the motors could lift the lift, but it would change direction going up and down really slowly due to all the inertia. For a DR4B or DR6B you usually only need gears on the two middle bars. Use aluminum when possible. In most cases, 5 wide c-channels are not necessary. 3 wide isn’t usually needed for a lift except maybe for the support towers.
Those are all the reasons I can think of why a lift wouldn’t be working the way you want it to.

Question: Why does my VEX claw motor always burn out? (The clawbot claw, and I’ve actually heard this from several teams)
Answer: Build your own claw. It’s not super hard, you’ll learn something, and you won’t look like as much of a noob team if you make your own claw.

1 Like

Also a piece of advice to new teams: While it is always a good idea to make your robot mechanically do a task, sometimes it is not necessary to do so, and it is better to use programming. Let me provide an example: There was a team at one competition I was at, whose robot was average. However they had problems with cones falling out of the rollers. Their solution was to use two motors on the cone intake rollers, the added motor provided resistance and kept the cone from falling out. However, that added a lot of unnecessary weight to the rollers and used a motor that they didn’t need to. A good alternative would be to do what we did, which is have the program roll the rollers inwards at motor speed 30 when the roller buttons aren’t being pressed. Just enough to keep the cone from falling out and at the same time not burn out the motor. The lesson to learn is sometimes investing in a little better programming can fix mechanical issues.

1 Like