diff --git a/wpimath/src/main/java/edu/wpi/first/math/system/plant/LinearSystemId.java b/wpimath/src/main/java/edu/wpi/first/math/system/plant/LinearSystemId.java
index 2e7d4b94f2..bff21492ef 100644
--- a/wpimath/src/main/java/edu/wpi/first/math/system/plant/LinearSystemId.java
+++ b/wpimath/src/main/java/edu/wpi/first/math/system/plant/LinearSystemId.java
@@ -135,14 +135,14 @@ public final class LinearSystemId {
*
u = K_v v + K_a a
*
* @param kV The velocity gain, in volts/(unit/sec)
- * @param kA The acceleration gain, in volts/(unit/sec^2)
+ * @param kA The acceleration gain, in volts/(unit/sec²)
* @return A LinearSystem representing the given characterized constants.
- * @throws IllegalArgumentException if kV <= 0 or kA <= 0.
+ * @throws IllegalArgumentException if kV < 0 or kA <= 0.
* @see https://github.com/wpilibsuite/sysid
*/
public static LinearSystem createDCMotorSystem(double kV, double kA) {
- if (kV <= 0.0) {
- throw new IllegalArgumentException("Kv must be greater than zero.");
+ if (kV < 0.0) {
+ throw new IllegalArgumentException("Kv must be greater than or equal to zero.");
}
if (kA <= 0.0) {
throw new IllegalArgumentException("Ka must be greater than zero.");
@@ -256,14 +256,14 @@ public final class LinearSystemId {
* u = K_v v + K_a a
*
* @param kV The velocity gain, in volts/(unit/sec)
- * @param kA The acceleration gain, in volts/(unit/sec^2)
+ * @param kA The acceleration gain, in volts/(unit/sec²)
* @return A LinearSystem representing the given characterized constants.
- * @throws IllegalArgumentException if kV <= 0 or kA <= 0.
+ * @throws IllegalArgumentException if kV < 0 or kA <= 0.
* @see https://github.com/wpilibsuite/sysid
*/
public static LinearSystem identifyVelocitySystem(double kV, double kA) {
if (kV <= 0.0) {
- throw new IllegalArgumentException("Kv must be greater than zero.");
+ throw new IllegalArgumentException("Kv must be greater than or equal to zero.");
}
if (kA <= 0.0) {
throw new IllegalArgumentException("Ka must be greater than zero.");
@@ -291,12 +291,12 @@ public final class LinearSystemId {
* @param kV The velocity gain, in volts/(unit/sec)
* @param kA The acceleration gain, in volts/(unit/sec²)
* @return A LinearSystem representing the given characterized constants.
- * @throws IllegalArgumentException if kV <= 0 or kA <= 0.
+ * @throws IllegalArgumentException if kV < 0 or kA <= 0.
* @see https://github.com/wpilibsuite/sysid
*/
public static LinearSystem identifyPositionSystem(double kV, double kA) {
if (kV <= 0.0) {
- throw new IllegalArgumentException("Kv must be greater than zero.");
+ throw new IllegalArgumentException("Kv must be greater than or equal to zero.");
}
if (kA <= 0.0) {
throw new IllegalArgumentException("Ka must be greater than zero.");
diff --git a/wpimath/src/main/native/include/frc/system/plant/LinearSystemId.h b/wpimath/src/main/native/include/frc/system/plant/LinearSystemId.h
index ad5d3b0e28..2b1508c063 100644
--- a/wpimath/src/main/native/include/frc/system/plant/LinearSystemId.h
+++ b/wpimath/src/main/native/include/frc/system/plant/LinearSystemId.h
@@ -79,7 +79,7 @@ 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.
+ * @throws std::domain_error if kV < 0 or kA <= 0.
* @see https://github.com/wpilibsuite/sysid
*/
@@ -89,8 +89,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
static LinearSystem<1, 1, 1> IdentifyVelocitySystem(
decltype(1_V / Velocity_t(1)) kV,
decltype(1_V / Acceleration_t(1)) kA) {
- if (kV <= decltype(kV){0}) {
- throw std::domain_error("Kv must be greater than zero.");
+ if (kV < decltype(kV){0}) {
+ throw std::domain_error("Kv must be greater than or equal to zero.");
}
if (kA <= decltype(kA){0}) {
throw std::domain_error("Ka must be greater than zero.");
@@ -122,7 +122,7 @@ 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.
+ * @throws std::domain_error if kV < 0 or kA <= 0.
* @see https://github.com/wpilibsuite/sysid
*/
@@ -132,8 +132,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
static LinearSystem<2, 1, 1> IdentifyPositionSystem(
decltype(1_V / Velocity_t(1)) kV,
decltype(1_V / Acceleration_t(1)) kA) {
- if (kV <= decltype(kV){0}) {
- throw std::domain_error("Kv must be greater than zero.");
+ if (kV < decltype(kV){0}) {
+ throw std::domain_error("Kv must be greater than or equal to zero.");
}
if (kA <= decltype(kA){0}) {
throw std::domain_error("Ka must be greater than zero.");
@@ -251,7 +251,7 @@ 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.
+ * @throws std::domain_error if kV < 0 or kA <= 0.
*/
template
requires std::same_as ||
@@ -259,8 +259,8 @@ class WPILIB_DLLEXPORT LinearSystemId {
static LinearSystem<2, 1, 2> DCMotorSystem(
decltype(1_V / Velocity_t(1)) kV,
decltype(1_V / Acceleration_t(1)) kA) {
- if (kV <= decltype(kV){0}) {
- throw std::domain_error("Kv must be greater than zero.");
+ if (kV < decltype(kV){0}) {
+ throw std::domain_error("Kv must be greater than or equal to zero.");
}
if (kA <= decltype(kA){0}) {
throw std::domain_error("Ka must be greater than zero.");