As seen here:
When we select RUN_WITHOUT_ENCODER run mode and setPower(1.0), our unloaded NeveRest 20 DC motor runs at 2800 encoder counts per second (CPS).
Therefore, when we select RUN_USING_ENCODER run mode, setMaxSpeed(2800), and setPower(1.0), we expect the same motor to run at a constant 2240 CPS. Instead, the motor runs at roughly 1800 CPS.
Environment:
NeveRest 20 Gearmotor (am-3102)
Core Motor Controller: rev 2.0 (configured for AndyMark)
SDK: ver 2.4
OpMode: Iterative
Robot Controller phone: Moto G 2nd Gen
Driver Station phone: ZTE Speed
@gearsincorg
Collaborator
gearsincorg commented on Dec 12, 2016
This is another "feature" of the Modern Robotics motor controller.
Their firmware chooses to enforce a certain amount of overhead on any constant speed mode (RUN_USING_ENCODER and RUN_TO_POSITION).
This means that their controller will not actually ever try to reach full speed in either of these modes.
They claim it is a feature, I have been fighting for many years that it is an annoying, and undesired constraint. I feel that they should let the programmer decide how much overhead they want, based on the specific motor/application.
That said, if you have a motor that naturally has a lower CPS, then you can bump up the MaxSpeed() and simply request a lower power... This gets around the forced overhead.
eg: in RUN_TO_POSITION, the MR controller limits (clips) the actual top speed to about 65% of MaxSpeed. So if you leave Max Speed set at 4000 CPS, and never request more than 0.65 power, you will effectively approach the top speed of your motor.
You do need to monitor performance in the field to ensure that you aren't demanding too much speed. If you find that the motor is slow at responding to a reduction in requested power, you may have exceeded the motor's capabilities.
Note that this is NOT a FTC_SDK issue, it's a long standing Hitechnic/ModernRobotics issue.