Pathfinder Turning Issue

Hi there,

I would start off thanking Jaci and vannaka for creating Pathfinder and Motion Profile Generator. It has helped me and my team’s tremendously with this year’s game.

However, although our auton works pretty well with going straight and turning to some degrees(i.e 30 degrees), I cannot seem to make the path that turns 90 degrees to work. It would just go straight instead of turning.

Some PID Values:

p = 0.6
i = 0
d = 0.2
Ka = 0

Thanks for the help.

Best guess is to try a much larger P value, the default is 1, and we changed ours to 3.0, which worked well for us. I think it is supposed to be quite high.

Do it attempt to turn at all ?

Are you using a gyro and heading correction? That made a huge difference for us when using a pathfinder. Jaci has example code on her site on how to implement this into your code.

We are using a NavX gyro and it definitely helped with the accuracy. I just don’t know why it can’t turn 90 degrees like in the path I created.

I might look into calibrating the gyro to make sure it’s giving good output. But yeah, the other path that didn’t require a sharp turn works great.

You might have the gyro jumping from 0 to 359.9, to solve this make sure you use pathfinder.boundhalfdegrees(desired_headig - gyro_heading); without this the robot will spiral the opposite direction the second it goes into negative numbers