It would help to describe your drive train setup, motors, gear ratios, wheel sizes, etc. Ideally, you should design your drivetrain so that you don’t draw too much current. That might mean adding more motors or changing the gear ratio so that your top speed is a little slower and the load is less.
Our general philosophy is that a well trained driver is better able to handle issues like this, rather then the code. A driver can easily learn to ramp up on the joysticks in normal cases, but push it when really needed.
We did use a ramp up in autonomous, which made it a little more repeatable. We ramped to full speed in 1 second in high gear, and to full speed in 1/5 of second in low gear. This was implemented as a command that took an input and checked the difference between that input and the previous input, and clamped the change if it was too large.
The Jaguars do have an automatic ramp feature (independent of the PID feature). See the Jaguar FAQ.
PID is overkill if all you want to do is implement a ramp.
If you’re using a normal drivetrain, you don’t need to do this. The FRC control system is capable of providing a lot of current to the drive motors during quick acceleration. Ask your hardware team why they think they need to do this.
Because they’re using Jags. If you don’t have the voltage ramping enabled and the gearing isn’t low enough the Jags are prone to tripping the overcurrent sensing (at least they were before Vex took over) when subjected to sudden large throttle movements (like full forward to full reverse).
I’ll echo what Joe Ross said up there. It’s far more important to have a competent driver who knows what he or she is doing than to mollycoddle him or her with fancy code. Hard to know when you’ll need that burst of power at a crucial moment, but your ramping code won’t allow it…
In any case, unless your driver is going from full forward to full back on the throttle very quickly (if this is the case, fire him/her), you should be alright.
Wow guys thanks for all the input. Its seems like I will opt for the Jaguar voltage ramping.
I agree with Joe Ross and T^2 on the driver argument but we are still pretty inexperienced and I think the driver still needs a little coddling. If that does not work I will probably do it in soft and provide an override if necessary.
Any input?
We were running a 4 cim 2 550 drive (using talons) and had problems with blowing the main breaker on quick direction changes. Adding in a very small(1/8 second I believe) voltage ramp completely fixed this problem. It doesn’t need to be very big at all and was unnoticeable to drivers anyways(you can’t accelerate instantly anyways so it is pretty unnoticeable).