Combining turn and linear movement PIDs

Hello, I was wondering if in someway you could combine the two actions of turning and linear movement into a single action, without the use of Pure Pursuit or Odometry. Currently I have a PID for moving forward and backwards and one for turning.
Thanks for the help.


are you talking about moving in an arc or moving in a strsight line while turning? for the former, you should use motion profiling, and for the latter you need a holonomic drive base.


That is not strictly necessary, as you can drift. But I definitely agree that holonomic drive base is easier to control for that purpose and it gives you a realistic chance at having repeatable results in the autonomous.

@TNT_7157X, you can use two PID loops for driving straight and turned combined into one.

Take a look at these:


i will be very impressed if I ever see a team do precise controlled drift.


Read the odometry / autonomous part, it talked about how they combined move and turning pid to create point to point movement.

Note that by doing so, you can’t control the global end angle of the chassis, it will only drive to the point. If you want to drive to a target point with a specified angle, motion profiling or other trajectory following algorithms will be better.


I’m assuming the poster is asking about combining PIDs to get an arc with a tank drive.
If they are asking about turning while driving w/ holonomic drive, I can make a new post.

@Drew2158U Motion profiling is unnecessary, you don’t need motion profiling to arc.


Yes, there are a few ways to do what you want (which I’m assuming is doing some sort of arc):

  • simply add the outputs of a distance and angle PID
    • you can control the arc length and final heading, but can’t really control final position (other than by tweaking)
    • you have to be careful about managing motor saturation (one PID overpowering the other) to have a smooth arc
    • simple but not ideal
  • you can instead have a different approach where you basically do a turn PID, but instead of tank(power, -power) you can do something like tank(power, power/3). This will cause the robot arc in a 3:1 ratio, and you can calculate that ratio from arc radius if you want

However, for anything more sophisticated, you do need one of the two:

  • odometry: like I did in the post linked above, use angle PID to hone in on a point while using distance PID to drive to the point. Also you can do pure pursuit.
  • motion profiling: can follow complex paths without needing sensors (odom).

moving in an arc path

no, you do not, but you might find yourself having issues with it being less than perfect at always ending up in the same spot.