Quote:
Originally Posted by vinharish7
Hi guys, thanks for your help; I understand how the rate of acceleration is derived with physics but I want to know how to limit the Volts/sec on our Mecanum drive motor controllers. We are using CANTalons, we're programming in Java--Command-Based, and we have implemented the setVoltageRampRate() method. That works pretty well to prevent the robot from zooming to a really high speed or stopping abruptly (which would cause totes to fall!) but the problem is driving is much tougher as drivers have to account for the time it takes for the robot to decelerate, making our positioning senses go out of whack.
Is there a way to program the mecanum drive so we can set a fixed low rate of acceleration without losing accurate drive position control? So we researched PID loops and such but since we have never implemented them before we wanted to know if this would solve our issue (I think it would?) and if so, how exactly... Do we have to create a new PID subsystem and somehow connect that to our motor controls?
Thank you! Any help will be greatly appreciated 
|
It sounds like you should use an integrated motion unit like the NAV6 or NAVX, or use encoders on you wheels (and derive acceleration from them). You could then run a control loop (not sure what exactly it should be- maybe Take-back-half?) to keep your acceleration constant, up to top speed (where power produced by the motor(s) is equal to the power consumed by friction).
You can possibly do some tweaking with the voltage ramping, but even then, that's just voltage, not acceleration. Your acceleration will be a function of input voltage, losses due to friction, (possibly traction), mass of vehicle, and current speed (because brushed motors produce linearly less torque as their speed rises).
This is a problem I've actually never seen tackled before, and one which we might look into using the nav6 board...