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
We are bringing up A301 motors on Systemcore + Motioncore while building and testing a single swerve-module pod. The pod uses one A301 for steering (theta) and another A301 for wheel drive.
Both encoders appear to work correctly in REV Hardware Client 2 when no robot program is deployed/running. They also update plausibly while running ordinary open-loop robot code that only calls setThrottle(...) and does not use encoder-based position control.
The failure appears when we try to use the A301 position-control APIs from robot code:
Earlier relative-position/relative-feedback testing on another A301 produced unusable feedback and could not stop at the requested travel.
The current swerve theta test uses the absolute encoder and the documented absolute-position APIs. Running it causes the encoder telemetry to become physically impossible, the controller to pulse, and Sensor Fault / Other Fault to appear.
Reinstalling 27.0.0-prerelease-15 restores normal-looking encoder telemetry. Running the absolute-position test causes the failure to return.
This makes the problem look specific to using encoder-based position control through REVLib, rather than a disconnected encoder or an encoder that is always defective.
Important
We stopped using the position-control test because the reported feedback cannot be trusted and the motor can react to fictional position error.
Environment
Component
Version / Configuration
Controller
Systemcore + Motioncore
WPILib / GradleRIO
2027.0.0-alpha-6
REVLib
2027.0.0-alpha-4
A301 firmware
27.0.0-prerelease-15
A301 bootloader
1.3
REV Hardware Client 2
1.2.1 on Systemcore
Theta A301
Motioncore D11, default CAN ID 3, 500 RPM gearbox
Drive A301
Motioncore D10, default CAN ID 3
Earlier relative test A301
Motioncore D4, default CAN ID 3
Supply voltage visible in recording
Approximately 16.46-16.48 V
Language
Java
All A301 objects use CANBusMap rather than raw integer bus IDs.
RHC2 encoder telemetry responds to physical movement.
The absolute and relative values update plausibly.
We do not see the same continuous impossible encoder motion caused by the position-control test.
This is an important distinction: the D10/D11 encoder hardware and read-only telemetry appear functional before encoder-based position control is engaged.
Absolute-Position Failure: Swerve Theta on D11
The swerve test follows the documented continuous absolute-position workflow:
The test also checks Signal.isValid() before using the absolute position.
Observed result
After running the absolute-position test, RHC2 shows the absolute encoder continuously moving around the single-turn range. Representative values from a short recording are:
0.234
-0.047
-0.344
0.359
0.094
-0.219
-0.359
At the same time:
Signal
Observed behavior
Absolute position
Continuously cycles through the single-turn range
Relative position
Changes even though the displayed current is 0.00 A
Velocity
Remains near 104857.594 RPM
Motor current
Remains 0.00 A in the recording
Gearbox rating
500 RPM
Faults
Sensor Fault and Other Fault appear intermittently
Warning
Has Reset Warning appears as sticky
104857.594 RPM is physically impossible for the 500 RPM A301 and looks like an invalid, saturated, sentinel, or incorrectly decoded value rather than real velocity.
The motor/controller also pulses as the control loop reacts to the changing feedback.
Relative-Feedback Failure: Earlier D4 Test
Before the swerve-pod test, we tested another A301 on Motioncore D4 as the first arm joint. We initially attempted both absolute and relative position-control approaches. The physical behavior did not follow the requested position targets, so we reduced the test to low open-loop throttle with encoder logging and a six-second safety timeout.
During the logged D4 run:
Signal
Observed value / behavior
Commanded throttle
-0.150000
Reported throttle
-0.150000
Applied output
Approximately -0.149988
Relative position
486685.3125, remained fixed during motion
Absolute position
-0.25, remained fixed during motion
Velocity
Approximately -104000 RPM
Current
0.0 A
Sticky fault
Present
Sticky warning
Present
Because the relative position did not change with physical movement, code could not stop after one requested rotation. The timeout did execute and returned the state machine to idle, showing that the OpMode itself continued to run.
This was a different A301 and port from the current swerve theta motor, but it showed a similar impossible velocity scale and unusable encoder feedback when attempting encoder-dependent control.
Reproduction After Firmware Reinstall
We reinstalled A301 firmware 27.0.0-prerelease-15 through RHC2.
Use RHC2 1.2.1 on Systemcore.
Reinstall A301 firmware 27.0.0-prerelease-15.
Power-cycle the A301.
Observe normal/stable encoder telemetry in RHC2.
Deploy and enable the absolute-position swerve test.
Summary
We are bringing up A301 motors on Systemcore + Motioncore while building and testing a single swerve-module pod. The pod uses one A301 for steering (theta) and another A301 for wheel drive.
Both encoders appear to work correctly in REV Hardware Client 2 when no robot program is deployed/running. They also update plausibly while running ordinary open-loop robot code that only calls
setThrottle(...)and does not use encoder-based position control.The failure appears when we try to use the A301 position-control APIs from robot code:
Sensor Fault/Other Faultto appear.27.0.0-prerelease-15restores normal-looking encoder telemetry. Running the absolute-position test causes the failure to return.This makes the problem look specific to using encoder-based position control through REVLib, rather than a disconnected encoder or an encoder that is always defective.
Important
We stopped using the position-control test because the reported feedback cannot be trusted and the motor can react to fictional position error.
Environment
2027.0.0-alpha-62027.0.0-alpha-427.0.0-prerelease-151.31.2.1on SystemcoreD11, default CAN ID3, 500 RPM gearboxD10, default CAN ID3D4, default CAN ID316.46-16.48 VAll A301 objects use
CANBusMaprather than raw integer bus IDs.Intended Swerve-Pod Behavior
The current test is intended to prove one swerve pod before expanding to a complete drivetrain:
0.042as straight ahead.-0.5/0.5boundary.Expected angle mapping with the current calibration:
0.0420.292-0.208-0.458after wrappingWhat Works Before Position Control
RHC2 with no robot code controlling the motors
Before deploying/running the position-control code, RHC2 telemetry behaves as expected:
-0.5and0.5.Open-loop robot code
We also have a separate
Swerve Pod Manual TestOpMode that only sends throttle commands:During this ordinary open-loop test:
This is an important distinction: the D10/D11 encoder hardware and read-only telemetry appear functional before encoder-based position control is engaged.
Absolute-Position Failure: Swerve Theta on D11
The swerve test follows the documented continuous absolute-position workflow:
The target is always normalized into the documented
-0.5to0.5range:The test also checks
Signal.isValid()before using the absolute position.Observed result
After running the absolute-position test, RHC2 shows the absolute encoder continuously moving around the single-turn range. Representative values from a short recording are:
At the same time:
0.00 A104857.594 RPM0.00 Ain the recording500 RPMSensor FaultandOther Faultappear intermittentlyHas Reset Warningappears as sticky104857.594 RPMis physically impossible for the 500 RPM A301 and looks like an invalid, saturated, sentinel, or incorrectly decoded value rather than real velocity.The motor/controller also pulses as the control loop reacts to the changing feedback.
Relative-Feedback Failure: Earlier D4 Test
Before the swerve-pod test, we tested another A301 on Motioncore D4 as the first arm joint. We initially attempted both absolute and relative position-control approaches. The physical behavior did not follow the requested position targets, so we reduced the test to low open-loop throttle with encoder logging and a six-second safety timeout.
During the logged D4 run:
-0.150000-0.150000-0.149988486685.3125, remained fixed during motion-0.25, remained fixed during motion-104000 RPM0.0 ABecause the relative position did not change with physical movement, code could not stop after one requested rotation. The timeout did execute and returned the state machine to idle, showing that the OpMode itself continued to run.
This was a different A301 and port from the current swerve theta motor, but it showed a similar impossible velocity scale and unusable encoder feedback when attempting encoder-dependent control.
Reproduction After Firmware Reinstall
We reinstalled A301 firmware
27.0.0-prerelease-15through RHC2.1.2.1on Systemcore.27.0.0-prerelease-15.The reflash recovers normal-looking telemetry, but using absolute-position control causes the failure to return.
Questions
27.0.0-prerelease-15or REVLib2027.0.0-alpha-4?104857.594 RPMa sentinel/error value that should cause the returnedSignal<Double>to be invalid?Signal.isValid()indicate only CAN-frame freshness, or should it also become false when the A301 reportsSensor Fault?getFaults().sensorbefore accepting encoder values, even when theSignalitself is valid?Minimal Absolute-Control Reproduction