Robot turns less than 90 degrees, even though in the program it's supposed to turn 90 degrees

The code I made may be malfunctioning as the program tells the robot to turn 90 degrees, while actually, it turns less than 90. Can someone please help and explain this?

Check if the gearing on the drivetrain is the same as it is in the program.

Perhaps your drive wheels are farther apart than the program thinks. If so, the program would calculate a smaller radius to your wheels, which in turn would have a smaller circumference from the axis of which you turn. This would cause your program to turn your wheels less.

In short, I suggest measuring your drive width and comparing that with the programmed drive width.

1 Like

There are a lot of potential issues that could have caused this, but it’s hard to diagnose anything with so little information. It could be wheel slip, encoder miscounts, bad code, etc… it would help if you sent code and/or a video of the robot reproducing the issue


the drive wheels are 6 inches apart horizontally, what about the programmed drive width?

also, how do i configure that?

in this section.


yeah, the wheelbase or track width?

track width is horizontal

1 Like

I always start with “what does the brain think it is doing?”

Using the print function in a forever loop, print to the brain screen what the gyro heading is. This will allow you to understand what the gyro thinks it is doing and is a good first step in diagnosing your root cause.


what is the regular normal programmed drive width in inches?

it’s fixed! YES! i just attached a gyro and tuned it down to 85.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.