How do you get your pure pursuit to switch from moving with one side of the robot as the “front” to the opposite side becoming the “front”? More specifically how do you make your pure pursuit switch which side is the front while still maintaining the same path? I am creating a pure pursuit controller for my team and this has been one of my biggest concerns. Is it even possible to do this in the middle of following a path or do you have to split the path in half, the first parting being with 1 side as the front and the second with the other?
A good example is this video by Sarah at 97963A:
If you want to drive backwards you can just make the drivetrain motors go the other direction and add 180 degrees to the rotation your robot is targeting when following the curve.
As for changing direction when driving a curve, I don’t see why you would want to do this. If you want to change direction, the robot needs to stop anyways, so there is no harm in just splitting your curve into two parts. If you still want to change direction while driving, you can either change the direction after some amount of time, or you can check the robot’s position and change it if it is at a specific spot.
Ah ok I see. Makes sense. Thank you
I would make an if statement saying that when a button is pressed that the drive train switches. So in the if statement just have the drive train in there but instead of forward have it be in reverse. I did that for one of my teams.
Not possible to do for autonomous, which is the OP’s use case in question…