This is our teams first successful year getting swerve with MK4i modules working and we tried to implement path planner however instead of following the path it moves back and forth in a semi-straight line until we E-stop it. It makes absolutely zero progress to the endpoint. The intended path just goes left downfield for a bit and then it stops and goes halfway back diagonally down.
This is a difficult thing to do the first time, working through it myself in non-swerve land.
What are the possible changes that can be made, which have you tried, what changed?
For example, each path has a constraint of max speeds, acceleration, angular velocities, etc. Are you doing this in the simulator, or just on the real robot?
Did you have telemetry updating in PathPlanner to see what the pathplanner expected results were, relative to the real result?
We messed with the all max velocities and how the path is set up, which seemed to do the trick for our first path (just about a foot of movment forward). We also changed the hot reload and holographic [somthing, edit later].
I believe we do have telemetry working but when we start auto the robot teleports across the sim field
I would suggest putting your max velocity very slow, and your acceleration about 1/3 of your velocity. That way your path will drive slow, and accelerate slow. Then you can tune with higher speeds as you get closer.
We tried changing these and seemingly nothing happened. We did find some other values related to path planner translation PID and the Max module speed, editing the translation PID seems to help but it’s stuttering around quite a bit although there is a stutter around the corner.
Does your odometry correctly reflect what the robot is actually doing? I say this because one problem I had while setting up PathPlanner was my math for converting the angular velocity (rpm) to linear velocity (mps).
So we got some progress by following the 8 step process in the yagsl documentation, now we’re stuck on some (what we think) PID issues, specially the pathplanner translation PID. Video in the video here the robot is supposed to stop right on the bit of tape without overshooting (I stuck the pathplanner view in there as well) From here we’re not really sure how to fix this as our PID tuning seems to be as good as it gets, any higher or lower and it gets worse.
Hey all, we ended fixing the problem by added a rotation PID and moved the max speed up from sds numbers. The code is on git if you want to look at it!