Servo calibration
Time: 11:10 AM to 11:35 AM
Before your robot can move accurately, you need to calibrate its servos. Calibration tells the software where “zero” is, so that every movement command starts from a known, centered position.
Run the calibration script
cd ~/picar-x/example && sudo python3 servo_zeroing.py
This script sets three servos to their mechanical center:
- Steering servo - controls which direction the wheels point
- Camera pan servo - controls left/right camera rotation
- Camera tilt servo - controls up/down camera angle
Visual check
After running the script, visually inspect your robot:
Check the wheels
The front wheels should point straight forward, not angled to either side.
Check the camera
The camera should face directly ahead at a level height, not tilted or rotated.
Adjust if needed
If any servo is off, adjust the trim values in the calibration config and re-run the script until everything is centered.
Why calibration matters
Without calibration, every movement command is relative to an unknown starting point. If the steering servo thinks “center” is actually 10 degrees to the left, then a command to turn right will not produce the expected result. Calibration fixes this by defining a reliable zero point.