Robot Going in Circles... Literally

Hello there! My robotics team is having difficulty programming our autonomous portion. Whenever we tell the drivetrain to move, it goes in circles with only the right wheel motor moving infinitly. However, when we drive it in the drive control section, the drivetrain works as it should. Any suggestions? The rest of the motors move fine, only the drivetrain is the issue.

Here is our code for the autonomous portion:

void autonomous(void) {
Drivetrain.driveFor(forward, 10, inches);

Hi! Welcome to the community! :smiley:

You want to check if your left and right drive motors are classified as “drivetrain left” or “drivetrain right” or else the built-in drive function doesn’t work. This is true for robotC and Vexcode IQ.
In robotC click the “Motor Configurations” and check the left and right option for the left drive motor and right drive motor respectively.
In Vexcode IQ, click the port icon and pick the drivetrain option. It will then ask you for the left drive motor and right drive motor ports.

These two are the only ones i know so if you the coding platform you use isn’t the ones mentioned above, search it up on vexforum or ask someone else : )

disregard this if you already did it but did you call the function in task main?


Also ensure that both drivetrain motors are working. Circles are usually from one drive side not moving.
Simply put the bot on its side and run the auton while wheel watching


Thanks for the suggestion. You are correct, the left wheels do not move at all during the autonomous portion. However, it is not a motor problem because in the driver control portion all motors work fine.

Sounds like the function used in autonomous isn’t properly working then. Maybe try directly setting the power for both sides of the drive in autonomous to see if that gets both sides to work. If that works, then it sounds like the problem is with the Drivetrain functions. The fact that the right side keeps spinning infinitely is a little worrisome because if it was only trying to get the right side to go 10 inches it would’ve reached that, but I also haven’t used VEXcode so I don’t know the specifics of how the Drivetrain stuff works.


Can you link your code in here? I have a feeling you tried to bundle the drivetrain into one function which is fine but may have gone wrong

If you’re using the assisted robot config to classify the drivetrain and your motor commands, sometimes that can be hard to work with, so maybe try activating expert robot config. I use it for all my programs, because it shows you straight up what the motors are set up as and it gives you more control over what you want the motors to do. If you don’t want to do that, then try a function for each individual side running simultaneously or review your drivetrain setup and see if you have a bug.

1 Like

Thanks, everyone. We figured it out! It ended up being the motor. It got the ‘on’ signal but didn’t turn off. We changed the motor and everything works now.