Here is a link to PID in C/C++. You should be able to make something timilar to it in Python: What is a PID controller? - #4 by Connor
For odometry, you can look here: https://nickmertin.ca/Tracking.pdf
For a lightweight “look and see what’s under the hood to make odometry” you can use and learn more about the Jar Template: GitHub - JacksonAreaRobotics/JAR-Template: A simple and powerful VEXcode library featuring PID, odometry, and custom motion algorithms. · GitHub
Hopefully this helps ![]()