How I can implement a high level PID controller that uses odometry to couple both motors in a diff drive wheeled robot? This is my try: From the motor controller, I can get the estimated speed in ticks/s for each wheel. Then, I calculate the odometry (current linear, angular speed and pose of the robot) from the estimated velocities for each wheel. I compare the current angular velocity of the robot with the target angular velocity. Depending if the error is negative or positive, I will apply the PID controller either to the right or left wheel. Does this approach sounds right?

I also have a low-level PI controller running in a motor controller for motor velocities.

I got the idea from here, page 69:



  • $\begingroup$ Would you please elaborate what you tend to achieve with your PID controller? If you simply like to control a differential drive, please look at differential drive's kinematic equations. Remember this is a non-holonomic system. $\endgroup$ – Franky Dec 5 '19 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.