PathProgram
I made this programming to run the path planner on my TankDrive base “I used a YouTube tutorial as a basis”, but when I run it autonomously, the robot’s speed is at its maximum and I can’t change it, does anyone know what could be wrong?
Also note that trajectory controller uses Velocity-based PID. That means it uses two parameters - maximum velocity and maximum acceleration expressed in SI units (m/s and m/s^2).
For the initial testing keep them reasonably low (usually no more than 1.5 m/s and say, 2 ms/^2) increase both PID values and the max constants above until you get them to the manageable state. Note also that the numbers being too low will result in a robot stopping early and not reaching the destination. Too high will make your robot jerky and overshooting, then returning back. So, you will find the right proportion in testing.
Also note that with Ramsete the main output of it is VOLTS that need to be applied to each motor controller (and obviously the volts are recalculated every 20 ms as you go along the trajectory)
With the right PID constants we found PathPlanner to be very precise, to less than 5cm error on about 10m run, if you do not have turns. Turns make it much more imprecise due to the side drag. So, we usually correct trajectories that need to be very precise, based on the IMU settings at the end.
The reason why I asked - PathPlanner 2024 version requires Beta 2024 version of WPILIB and beta version of NI RoboRIO image. So just checking if you used 2023 link. It’s on the same page