# Wall Follow

I implemented this for the F1TENTH. Basically, keeping the car at a constant distance from the wall.

This distance is called the cross track error.

Links

#### PID Tuning for the VESC

There’s this thing called the PID Loop Rate??

#### PID for Wall Following

In the context of F1TENTH, we use PID to keep a car centered. We have two control objectives:

- Keep the car driving along the centerline ($y=0$)
- Keep the car parallel to the walls ($θ=0$)
- We define as after driving $L$ meters, we are still on the centerline. ($Lsinθ=0$)

Applying the general PID Control equation, we define the error term as $e(t)=−(y+Lsinθ)$ The error term is basically Error.