Smart Motor Controller Wrapper for Brushless Motors #7481
Unanswered
thenetworkgrinch
asked this question in
Ideas
Replies: 1 comment 1 reply
-
I agree wrappers are useful. Got started on a spec here https://docs.google.com/document/d/1N0p_WPJfvQAa_iPqGGgkQPSaS9B87mLqIYqtC-e1O94/edit but didn't get around to making more progress |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Smart Motor controllers have made huge advancements in FRC that merit a generalized class so WPI can write documentation on how to utilize these features.
The most prevalent example would be a Swerve Motor Controller, and as such would be the ideal scenario to develop for.
The general interface would need
getSupplyVoltage()
and/orgetStatorVoltage()
(Can be combined with enum parameter)getSupplyCurrent()
and/orgetStatorCurrent()
(Can be combined with enum parameter)setCurrentLimit(CurrentLimitClass limits)
setRampRate(RampRateClass rate)
setMotorRotationToMechanismRotation(Rotation.of(0.25), Rotation.of(1))
setFeedback(FeedbackClass pid)
setFeedforward(SimpleMotorFeedforward ff)
setTarget(Rotation)
andsetTarget(LinearVelocity)
getPosition()
andgetVelocity()
saveSettings()
setBrakeMode(bool)
A general reference would be YAGSL
SwerveMotor
however this is unfit for a complete push into WPILib because it is even more generic.https://github.com/BroncBotz3481/YAGSL-Example/blob/dev/src/main/java/swervelib/motors/SwerveMotor.java
Beta Was this translation helpful? Give feedback.
All reactions