-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecating current DcMotor run mode naming #1344
Comments
A With |
as far as I'm aware, DcMotorEx.setVelocity() exits, which does what you say |
Yea that naming is also more accurate imo. Speed is non directional,
velocity is and .setvelocity() can be positive or negative
…On Mon, Dec 2, 2024 at 5:02 PM Oscar Chevalier ***@***.***> wrote:
as far as I'm aware, DcMotorEx.setVelocity() exits, which does what you say
—
Reply to this email directly, view it on GitHub
<#1344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUYOI6D5FDQSNGBBZNAUGR32DTRJ7AVCNFSM6AAAAABS36UHU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJTGE2TQOJVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Thank you @Froze-N-Milk !!! |
I have personally ran into those issues in 2016 when I was actively competing. Seeing as this hasn't changed is quite surprising as this was unbelievably easy to get wrong and lose sanity over. |
Currently, the SDK has three run modes to expose the Lynx firmware functionality for motors, those being
RUN_WITHOUT_ENCODER
,RUN_USING_ENCODER
, andRUN_TO_POSITION
for the standard set power mode, the velocity PID, and the positional PID.As someone who spends a lot of time helping inexperienced programmers learn, I can pretty confidentially say that few new programmers properly interpret what the run modes actually do from their names. Many, many people assume (in my opinion, quite reasonably) that you must set the motor mode to
RUN_USING_ENCODER
to use.getPosition()
. In reality,RUN_USING_ENCODER
is a velocity control mode, which can lead to very confusing behavior when used without understanding what that mode actually does.I propose that in a future SDK release,
RUN_USING_ENCODER
andRUN_WITHOUT_ENCODER
should be deprecated and replaced byRUN_TO_VELOCITY
andSET_POWER
(or similar, likeRUN_SET_POWER
for consistency) to clear up the actual function of the run mode.The text was updated successfully, but these errors were encountered: