We have been trying to get path-following working on our robot. Even though we ran many tests, we still seem to have off-paths. (example videos below)
We are aware that FF values are model-based values, however, using the calculated values (from the characterization tool) did not give us great results. Therefore, we started to tune them (possibly with a very wrong approach).
This tuning approach got us incredible results for the path we were trying to run. However, when we tried another path with it, it was worse than ever. We would be very grateful if someone could give us more resources on how to tune FeedForward values or fix it in any way.
Here is our drivetrain configuration:
- 4 x CIM + Toughbox Micro 12.75:1
- 4 X Talon SRX + SRX Mag Encoder
- 4 x 6" Mecanum Wheels
You can view our code here.
The path we tried is this:
Here are the steps we followed:
We tried the calculated trackwidth with PID enabled. (We also passed the calculated trackwidth to the Pathweaver project.) The calculated trackwidth was better compared to the real trackwidth. Video here.
We passed 0 to the PID values and ran the path again. (This and all consecutive steps use the calculated trackwidth with PID disabled unless specified otherwise.) This was very similar but a bit better compared to the first step. Video here.
Afterwards, we zeroed, multiplied by 0.5 and 1.5 the kS, kA, and kV values one at a time to see their effect.
After we saw how each affected the trajectory, we started tuning the kS. It seemed to affect how long the trajectory was in real life. We found that calculated kS * 2.0 was sweet enough. Video here. (My right foot is the expected arrival point of the path.)
We were happy with our FF values, so we enabled the PID with the calculated P value. Video here.
We were very happy that we got this path working. However, when we switched to a more extreme path, it was nowhere near the path it was supposed to follow. The path we tried as the ultimate test:
And the video of our fail is here.
Even though the characterization tool gives us model-based values, can we tune the FF values in any way? If so, are there any methods we can follow? If it is wrong to tune the model-based FeedForward values, how should we improve our auto routines?
We realize that having mecanum wheels and running the auto routine on a normal floor might cause some slips/errors. We will be switching to a more robust drivetrian next year. However, we want to learn what we are doing wrong using this mecanum chassis.
Also, we have read that it is a known issue that mag encoders cause noise on characterization here. We think this is the biggest issue in our case because we had a lot of noise. You can view our characterization data here. We want to learn if there are any other ways to solve this without switching encoders?