Closed MischeviousMasterMind closed 2 years ago
Leave gear ratio at 1
It is still overshooting.
One thing to note is that the distance traveled in the Straight Test remained consistent, so I don't believe it is a problem with the drive constants.
It is still overshooting.
By how much? If it's a few inches it's probably to be expected due to the decel problem. I don't think anyone has quantified it but I am betting if you integrate the decel phase lag it comes out to the distance that the bot overshoots. Just let the follower pids handle that.
It still overshot by about -74 inches when I told it to run 4 inches.
lol that is quite the error. You also have yet to tune your velocity pid.
It looks like you have tuned neither the velo PID or the FF, can you update this once you tune one of those
When I ran the straight test, I noticed that the robot is running way longer than it is supposed to. I checked the dashboard and saw that according to the graph, the robot is currently running a lot slower than it actually is. To investigate further, I set the distance of the Straight Test to one inch and then ran the code. What I saw, it seemed that the robot was running one tile instead of one inch. And on the graph, it seemed that it is actually running one inch. So, I multiplied my gear ratio by 24 and then tried again. What I saw was that the robot was still running one tile, but on the dashboard, it showed the robot running one tile and the end pose to be one inch. It is seems that the robot kept on overshooting.
To prove this further, I set the distance of the Straight Test to 4 inches and the MAX_VEL and MAX_ACCEL variables to 2 and it was repeating the same behavior as my last test. Instead of 4 inches, the robot ran 4 tiles and the endpose was still 4 inches. The robot doesn't notice that it is overshooting and still runs instead of decelerating.
The Link to the Video
I'm using the 5202 Series Yellow Jacket Planetary Gear Motor (5202-0002-0019) and the 96mm Mecanum Wheel Set (3213-3606-0002). I am using drive encoders. This is what my Drive Constants looked like before I multiplied the gear ratio by 24 and set the MAX_VEL and MAX_ACCEL to 2: