Smart Motor Controller Wrapper for Brushless Motors #7481
Replies: 2 comments 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.
-
|
Update to this. As apart of my mechanisms library I made a common As for comprehensiveness of the existing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
SwerveMotorhowever 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