dr-hextanium / cookbook

A clean, quick reference for common issues faced in the context of the FIRST Tech Challenge.
https://cookbook.dairy.foundation
11 stars 9 forks source link

Using a PID Controller with Roadrunner 0.5.6 #10

Open Vivexplorer opened 7 months ago

Vivexplorer commented 7 months ago

To use a PID(f) controller with Roadrunner trajectories, you need to use async trajectories so that the PID controller can run in the background. You can do this by " drive.followTrajectoryAsync(trajectory); " You will also need to add another line of code inside of your loop: drive.followTrajectoryAsync(trajectory);

For more information, consider looking at the roadrunner page on async following.

RuckusRoboticsCode commented 7 months ago

this is being reviewed rn already

Vivexplorer commented 7 months ago

Okay