Can someone help me on my drivetrain code for autonomous. Whenever I code it to turn right, it goes forward and vice versa. Please help me, this is very urgent as states is in 1 week!
It would be nice if you could share your code so we can help!
Sorry if the clarity is bad: This is also my drivetrain setting
Likely you don’t have one of the drive motors reversed, and/or you haven’t accounted for gearing when determining forward vs backwards. Start be making sure your robot setup is correct (left OR right, one of the motors has to be reversed), and get it driving forward properly first, and that will almost certainly fix the turning.
How would I do the things you said, because I have never had to encounter such a problem when doing autonomous.
I thought the Drivetrain setup allowed you to select motor reversal, but apparently it doesn’t.
Instead, try switching the direction that it thinks is forward by clicking the grey downward facing arrow, and see if that helps.
Test it by making just a “drive forward 6 inches” type block and make sure it drives forward. I would recommend picking up the robot when that command runs as well to make sure both motors are turning at about the same rate, so that you’re not running into an issue of a motor (or major friction) causing issues.
Tried that too, doesn’t work.
Drivetrain is now drifting, even when asked to move forward and doesn’t stop! Please help!
This might not help at all, but try redownloading your code (if you haven’t already) as it may have gotten corrupted. This worked for us.
Just want to put the issue has been fixed. Thanks for your responses though!