Line following simulation

Our team created a line following simulation using the pyfrc simulator and I thought I’d share it here in case anyone finds it useful. It might not be accurate enough to fully develop your line following algorithm but I found it very useful for demonstrating the concept to the kids and letting them work through their own ideas.

We created a mirror of the robotpy/examples repository and added a branch called “feature/tapeworm”. If you clone and switch to that branch you will find a folder called tapeworm.

src/physics.py contains the simulation and src/robot.py contains a simple line following algorithm for demonstration.

https://github.com/jgrussjr/robotpy-examples

1 Like

A more direct link…

https://github.com/jgrussjr/robotpy-examples/tree/feature/tapeworm/tapeworm