Hello everyone, I am from frc team 108 SigmaC@Ts and my team and I have been struggling with trying to get our robot to drive while rotating in autonomous but when we try to run it, it is just rotating in place jittering from rotating left then rotating right. And we just started using swerve drive last year and came up with the same issue so we had to stick to basic straight line movements. Here is our github: SigmaCode2023-Pathplanner2024_Testing
We had the same issue today, when we run it in a straight line, it drives just fine but when we drive for 1m with rotating, it goes under the condition you’ve described. We would also appreciate any help
Okay, I will try that, thank you very much. Can you also give me some pointers when it comes to fine-tuning the PID constants for the configuration of Holonomic since I still don’t understand how to go about it yet
A lot of tuning a PID is trial and error there is a sort of method to it but it basically involves just messing with numbers and adjusting basing off what you see, logging your current pose vs your desired and graphing it is very helpful in trying to see what it’s doing, a good way of thinking about the different constants is
P: if you’re not where you want to be, get there.
I: if you haven’t been where you want to be for a long time, try to get there harder
D: if you’re getting close to where you want to be, slow down.
Yes that is helpful. I am just having issues with how to tune them. Do I tune the translation PID first or the rotation PID
They shouldn’t affect each other, doesnt matter which one you tune first
Were you able to fix the issue?
Yes. So some of the problems that I came across was unit conversions for the swervekinematics, inverting the robots heading (counterclockwise is suppose to be positive and clockwise is suppose to be negative), setting the max module speeds accordingly, and making sure that the chassis speeds outputs to the configuration of the configurations of holonomic were relative speeds
So should the max speeds in PathPlanner match the max module and robot speeds in your code or does it work when the max speeds are lower in PathPlanner?
I was working with it and it seems like whatever you write in the configuration will change the actual speed but I would say match the speeds in pathplanner with the max module speeds you put in the code unless you need for parts of the path to go of a lower speed
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.