[docs] Add missing JavaDocs (#6146)

This commit is contained in:
Tyler Veness
2024-01-04 08:38:06 -08:00
committed by GitHub
parent 6e58db398d
commit f29a7d2e50
145 changed files with 1106 additions and 94 deletions

View File

@@ -9,6 +9,7 @@ import edu.wpi.first.math.Num;
import edu.wpi.first.math.Pair;
import org.ejml.simple.SimpleMatrix;
/** Discretization helper functions. */
public final class Discretization {
private Discretization() {
// Utility class

View File

@@ -8,6 +8,18 @@ import edu.wpi.first.math.Matrix;
import edu.wpi.first.math.Num;
import edu.wpi.first.math.numbers.N1;
/**
* A plant defined using state-space notation.
*
* <p>A plant is a mathematical model of a system's dynamics.
*
* <p>For more on the underlying math, read
* https://file.tavsys.net/control/controls-engineering-in-frc.pdf.
*
* @param <States> Number of states.
* @param <Inputs> Number of inputs.
* @param <Outputs> Number of outputs.
*/
public class LinearSystem<States extends Num, Inputs extends Num, Outputs extends Num> {
/** Continuous system matrix. */
private final Matrix<States, States> m_A;

View File

@@ -11,6 +11,7 @@ import java.util.function.BiFunction;
import java.util.function.DoubleFunction;
import java.util.function.Function;
/** Numerical integration utilities. */
public final class NumericalIntegration {
private NumericalIntegration() {
// utility Class

View File

@@ -11,6 +11,7 @@ import edu.wpi.first.math.numbers.N1;
import java.util.function.BiFunction;
import java.util.function.Function;
/** Numerical Jacobian utilities. */
public final class NumericalJacobian {
private NumericalJacobian() {
// Utility Class.

View File

@@ -12,16 +12,34 @@ import edu.wpi.first.util.struct.StructSerializable;
/** Holds the constants for a DC motor. */
public class DCMotor implements ProtobufSerializable, StructSerializable {
/** Voltage at which the motor constants were measured. */
public final double nominalVoltageVolts;
/** Torque when stalled. */
public final double stallTorqueNewtonMeters;
/** Current draw when stalled. */
public final double stallCurrentAmps;
/** Current draw under no load. */
public final double freeCurrentAmps;
/** Angular velocity under no load. */
public final double freeSpeedRadPerSec;
/** Motor internal resistance. */
public final double rOhms;
/** Motor velocity constant. */
public final double KvRadPerSecPerVolt;
/** Motor torque constant. */
public final double KtNMPerAmp;
/** DCMotor protobuf for serialization. */
public static final DCMotorProto proto = new DCMotorProto();
/** DCMotor struct for serialization. */
public static final DCMotorStruct struct = new DCMotorStruct();
/**

View File

@@ -12,6 +12,7 @@ import edu.wpi.first.math.numbers.N1;
import edu.wpi.first.math.numbers.N2;
import edu.wpi.first.math.system.LinearSystem;
/** Linear system ID utility functions. */
public final class LinearSystemId {
private LinearSystemId() {
// Utility class