Pathweaver auto goes haywire after 2 paths

Ok, here’s the situation:

We’ve been writing a new autonomous mode for our next event and everything has been going smoothly up to now. The paths run well the sequential command groups run as expected… until I tried to run this autonomous path:

It consists of 3 paths. The robot follows the first two paths as instructed, then it just does donuts as shown in the video below

I’ve never encountered this problem before. I tried to run the auto 5 times and without fail, it would execute the two first paths flawlessly, and then do donuts as shown in the video every time.

Here’s my code: https://gitlab.com/ecscher84/2815-robot-2023/-/tree/Latest

Can someone provide some insight into why this is happening? Thanks!!

It looks like you’re not resetting odometry to the initial pose of the trajectory- this could definitely be causing the issue you’re describing.

1 Like

Wouldn’t that cause the robot to stop following the path after the first path? Because it follows the second one perfectly. If it were an odometry resetting problem, wouldnt the second path not work?

Do you mean at the start of the autonomous routine?

I would expect it to cause issues with the second path- that’s what happened for us. Just the first thing that came to mind; might be worth a try.

Should be something like this:

addCommands(new InstantCommand(() -> odometry.reset(trajectory.getInitalPose()));

in AutoPath, before the RamseteCommand.

1 Like

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