Skip to content

Commit

Permalink
[wpimath] Add SysId doc links to LinearSystemId in C++ (NFC) (wpilibs…
Browse files Browse the repository at this point in the history
…uite#5960)

They already exist in Java.
  • Loading branch information
calcmogul authored and Starlight220 committed Dec 1, 2023
1 parent a942318 commit 9e2258f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wpimath/src/main/native/include/frc/system/plant/LinearSystemId.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
* @param kV The velocity gain, in volts/(unit/sec).
* @param kA The acceleration gain, in volts/(unit/sec²).
* @throws std::domain_error if kV <= 0 or kA <= 0.
* @see <a
* href="https://github.com/wpilibsuite/sysid">https://github.com/wpilibsuite/sysid</a>
*/
template <typename Distance>
requires std::same_as<units::meter, Distance> ||
Expand Down Expand Up @@ -118,6 +120,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
* @param kA The acceleration gain, in volts/(unit/sec²).
*
* @throws std::domain_error if kV <= 0 or kA <= 0.
* @see <a
* href="https://github.com/wpilibsuite/sysid">https://github.com/wpilibsuite/sysid</a>
*/
template <typename Distance>
requires std::same_as<units::meter, Distance> ||
Expand Down Expand Up @@ -159,6 +163,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
* second squared).
* @throws domain_error if kVLinear <= 0, kALinear <= 0, kVAngular <= 0,
* or kAAngular <= 0.
* @see <a
* href="https://github.com/wpilibsuite/sysid">https://github.com/wpilibsuite/sysid</a>
*/
static LinearSystem<2, 2, 2> IdentifyDrivetrainSystem(
decltype(1_V / 1_mps) kVLinear, decltype(1_V / 1_mps_sq) kALinear,
Expand Down Expand Up @@ -186,6 +192,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
* right wheels, in meters.
* @throws domain_error if kVLinear <= 0, kALinear <= 0, kVAngular <= 0,
* kAAngular <= 0, or trackwidth <= 0.
* @see <a
* href="https://github.com/wpilibsuite/sysid">https://github.com/wpilibsuite/sysid</a>
*/
static LinearSystem<2, 2, 2> IdentifyDrivetrainSystem(
decltype(1_V / 1_mps) kVLinear, decltype(1_V / 1_mps_sq) kALinear,
Expand Down Expand Up @@ -215,6 +223,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
* @param J the moment of inertia J of the DC motor.
* @param gearing Gear ratio from motor to output.
* @throws std::domain_error if J <= 0 or gearing <= 0.
* @see <a
* href="https://github.com/wpilibsuite/sysid">https://github.com/wpilibsuite/sysid</a>
*/
static LinearSystem<2, 1, 2> DCMotorSystem(DCMotor motor,
units::kilogram_square_meter_t J,
Expand Down

0 comments on commit 9e2258f

Please sign in to comment.