Robot consistently overturning

Hello, I have found someone else on the forum that have had this issue, and I have been emailing Vex support for several weeks but have not heard back lately. The issue is that my classes’ robots are overturning when using the drivetrain settings for a 90 degree turn. Several teams including myself have gotten 110-120 degree turns when inputting 90 degrees.

We have done the following to troubleshoot this:

  1. Rechecked the measurements of the track width and wheel base, multiple times,

  2. Ensured the wheels are properly attached using metal shaft collars,

  3. Ensured our shafts are not bent,

  4. Ensured that it is done on a flat “sport court” surface to keep the robot from sliding,

  5. Ensured that the robot, brain, battery, radio, and controller are all a current firmware version,

  6. Ensured that VexCode V5 Blocks has been updated to a current version.

Vex support has only asked me to check the things above I already have listed as testing.

Part of me wants to abandon drivetrain and just use motor rotations. However, I’m not even sure if I can trust the motor rotation functions to rotate a given amount of degrees if the drivetrain functions are not accurately measuring the turns. I strongly suspect that this is a software/firmware issue, but I wanted to make this new topic in the hopes someone could offer advice. Thanks.

Have you guys tried implementing a PID Loop. It helps with correcting when the robots speeds over the turn amount. You can find out how this in many places on the forum. There is a guide called “PID Tutorial” by @Connor. It is pretty helpful so you should check that out for some help. VEXCode PID Tutorial

6 Likes

That’s really common. Since your robot has momentum, it will not stop exactly at 90 degrees even if you tell it to. The brake type is also a consideration. If the brake type is coast, the robot will take even longer to come to rest. There are several solutions to this - slow down when you get close to your target (so the robot doesn’t have as much momentum) or compensate for the overshoot by setting the target earlier. It doesn’t seem like there is anything wrong with your equipement and it is working as designed.

5 Likes

The built in drive train isn’t meant to be accurate, it’s only a starting point to advanced programming. Making it not accurate gives programmers a chance to create their own code to make it accurate

2 Likes

It’s definitely not a momentum issue, as this happens when the robot moves at 5-10% speed.

Are you using the gyro or inertial sensor? Gyro needs to be calibrated.

1 Like

Students and I were not having an issue with this until one of the software/firmware updates in late 2019. Sure it would be off by 5-10% degrees, which I think is expected, but the magnitude of overturning has increased since they added the drive train/wheel base measurements.

It is a measurement issue. Just because you put in the perfectly measured values of your drive base, that does not mean you have defined the center of mass or turning diameter of your base. The methods in the class will be attempting to make the values you input into the drivetrain class into the circle in which your bot turns in place and relate that to wheel rotations to result in the change in heading you are asking for. I would assume they use track and base to define a rectangle and the circle in which that rectangle is inscribed is what is used to relate wheel rotations to heading. That the wheel travel along that circle is used to make the heading change.

HOWEVER, your drive base could easily not turn in that way. Weight distribution or having six wheels or other factors could make it turn differently. What I am getting at is to play with the track and base numbers until you get better results. If putting 12" in place of a measured 12.75" results in a correct turn, that is fine. It just means that the approximation that drivetrain methods use for turns was incorrect when given the measured number.

Also, as others mentioned, some amount of over turning due to momentum is to be expected.

4 Likes

can you post the wheelbase, wheel diameter and track width numbers you are using ? (you said no gyro or IMU, yes ?) also a photo of the robot may help diagnose. As other have said, any generic algorithm will not work perfectly for everyones robot. Wheel type, gearing, weight etc. are all factors that will impact the turn. The code in the drivetrain just calculates a theoretical number of wheel revolutions to achieve the turn , if your robot is consistently turning to a different position, just adjust the track width and/or wheelbase as necessary to get correct results.

8 Likes