Help auton not working

My drivetrain keeps stopping in the exact same area no matter what i do I even changed the location i’ve used millimeters instead of inches and to top it all off it drives fine I don’t know whats happening pls help

Could we see your code please?

Yes here
Screenshot 2024-01-04 11.21.09 AM

1 Like

Looking at your code, this is a good thing. Are you saying that your robot is stopping in the wrong place?

1 Like

Yes, by what I measured plus 5 more inches it stops in the wrong spot

Is your drivetrain a direct drive or does it use a gear train/sprocket chain to modify the rpm? If you do, then your code won’t be accurate due to the different gear circumferences.
Could you send us a pic of your drivetrain?

1 Like

This problem is most likely due to the existence of friction, your drivetrain naturally experiences this, a way to help prevent friction is the use of screw joints, here is a forum post that goes into some detail, multiple teams use screw joints on their drivetrain YouTube is a good place to look for explanations on how they work as well. If this isn’t your problem it could have to do with your gearing but seeing that the amount it is off is so small I highly doubt that is the issue. To fix your problem I would suggest using time instead of length as a measurement for your autonomous code and utilizing a GPS sensor (there are several posts about this and how it can be used). Hope this helps I am not the primary coder on my team so I might not be able to provide a lot of technical support if you have questions concerning that.

1 Like

It uses the striker drivetrain, but in the past using the exact same auton it worked perfectly

Maybe your motors could play a role in this problem, and try it at a different distance.

I did that
20 charact

What brake mode is the drivetrain in? If it is in coast mode (I think coast is the default) then the drivetrain could “glide” past the desired stopping location. Try finding the set brake mode block and setting the brake mode to brake before you run the drive command.

The problem is that it stops 27 feet before the desired position (Yes I measured)

Ok new problem the old problem was fixed but this one not even my mentor can fix basically my code works fine bout it won’t reverse at all and I’ve tested it in different areas even outside the field on a smooth floor but the motors just make a high pitched noise

Your motors are probably burned out, try replacing them.

1 Like

I’ve tried that
20 cahra

If it’s making a high pitched noise, I believe the motors are not spinning at all
Try just putting the reverse block in your code and see if it works
Also can we see a screenshot because I might know what’s going on

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