You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
The position model is reasonable. DcMotor.getCurrentPosition() returns the current position as read by the encoder. One can set a desired position with DcMotor.setTargetPostion(int ticks); that causes the controller to seek the target position. There is no guarantee that the motor will ever reach that position. One can learn the target position by invoking DcMotor.getTargetPosition().
DcMotorEx offers PIDF position control using the same methods, but its PIDF velocity control does not follow the pattern.
DcMotorEx.getVelocity() returns the current velocity (angular rate) in ticks per second. That method is analogous to getCurrentPosition(). For parallelism, the method should be renamed to getCurrentVelocity().
DcMotorEx.setVelocity(double angularRate) is not analogous. It does not set the actual velocity but rather sets a target velocity. To follow the pattern, the method should be renamed setTargetVelocity(double angularRate).
The position model is reasonable. DcMotor.getCurrentPosition() returns the current position as read by the encoder. One can set a desired position with DcMotor.setTargetPostion(int ticks); that causes the controller to seek the target position. There is no guarantee that the motor will ever reach that position. One can learn the target position by invoking DcMotor.getTargetPosition().
DcMotorEx offers PIDF position control using the same methods, but its PIDF velocity control does not follow the pattern.
DcMotorEx.getVelocity() returns the current velocity (angular rate) in ticks per second. That method is analogous to getCurrentPosition(). For parallelism, the method should be renamed to getCurrentVelocity().
DcMotorEx.setVelocity(double angularRate) is not analogous. It does not set the actual velocity but rather sets a target velocity. To follow the pattern, the method should be renamed setTargetVelocity(double angularRate).
DcMotorEx does not have a method to discover the target position. There should be a DcMotorEx.getTargetVelocity() method.
The text was updated successfully, but these errors were encountered: