Auton turning not working in Pros VS Code c++

We can’t control the turning, like how much it turns and whenever we change the degrees it does nothing, our bot will only turn in one direction.

Can you send the current code you are using? Is it the drivetrain class or a custom function?

Generally if you have a question about your code you should include the code.

I stated the problem extremely bad earlier, the question I have is how do I control which direction the robot turns? The direction it automatically turns is not the most efficient way. This problem only occurs on 2 out of the 6 turns in our autonomous.

chassis.set_turn_pid(62, 70);
chassis.wait_drive();

That is one of the turns that is sub-optimal. It starts facing 300 degrees, but then turns counter-clockwise. Sorry for the confusion in the actual post, I was panicking a bit when I wrote it.

I am pretty sure it would be putting a negative angle.

Better yet, you could adjust your turning method to first determine which direction is quicker to get to the desired angle and then turn in that direction.

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