rambunction4330 / librmb

A library designed to ease the pain of FRC robot programming. TLDR; Make motor spin good better
https://rambunction4330.github.io/librmb/
MIT License
1 stars 1 forks source link

PID Setting Function #38

Closed theVerySharpFlat closed 11 months ago

theVerySharpFlat commented 1 year ago

Currently we set PID constants on motor controllers using class-specific structs in their constructors such as

https://github.com/rambunction4330/librmb/blob/fa88a2271c1595d770312ef8158c5ee46ec20940/src/rmb/motorcontrol/falcon/FalconPositionController.h#L30-L38

However, we want to have a unified method of setting PID constants across all motorcontrollers.

To do this, you will have to

You should start this work on a git branch called "feature/PIDFunction" and create a pull request on GitHub when you finish.

sullivanlm commented 11 months ago

https://github.com/rambunction4330/librmb/blob/caad1081f54e6d7262d0f61418e652a70332c6e4/src/rmb/motorcontrol/Conversions.cpp#L50C20-L50C20

In the AngularAsLinearVelocity/PositionController, when I implement the setPIDConstant function, it doesn't recognize PIDConfig on its own but needs to reset in the implementation. Rather than having: void setPIDConstant(config) {} I wrote it as: void setPIDConstants(AngularVelocityController::PIDConfig config) {}

I'm not sure if this is an issue or not but this didn't come up in the LinearAsAngularVelocity/PositionControllers