DriveToPoint PID stuttering

I wanted to make this post because I figured other people may have had the issue I have, and might be able to help.

Essentially, when I tell my robot to drive to a point, it stutters at the beginning and end. I’ve verified my linear and angular PIDs are decently tuned, so I don’t think that’s the issue. If anyone has tips or suggestions to help, please let me know!

Here’s a video of my robot driving to (12, 4):

1 Like

We’ll need to take a look at your code to help.

2 Likes

Probably going to need the code to help.

  • How are you combining the linear/angular PID outputs to get motor voltages (or are you doing them sequentially, ie turn, settle, then drive)?
    • If you are combing the outputs (i.e. driving and turning at the same time), are you performing any biasing towards the angular output (a “turn scale”)?
  • What do your tuning constants and PID implementation look like?
  • Does the stuttering happen when only performing a turn or drive forward?
2 Likes

I was able to fix this on my own because after some debugging I realized I didn’t convert my angle to radians before using the cos function :man_facepalming:.

Thanks for the reply though!

2 Likes