mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[docs] Fix Doxygen warnings, add CI docs lint job (#3639)
The CI docs lint build is configured to fail on Doxygen warnings.
This commit is contained in:
@@ -97,7 +97,7 @@ class ControlAffinePlantInversionFeedforward {
|
||||
/**
|
||||
* Returns an element of the previously calculated feedforward.
|
||||
*
|
||||
* @param row Row of uff.
|
||||
* @param i Row of uff.
|
||||
*
|
||||
* @return The row of the calculated feedforward.
|
||||
*/
|
||||
|
||||
@@ -54,7 +54,7 @@ class WPILIB_DLLEXPORT HolonomicDriveController {
|
||||
* Sets the pose error which is considered tolerable for use with
|
||||
* AtReference().
|
||||
*
|
||||
* @param poseTolerance Pose error which is tolerable.
|
||||
* @param tolerance Pose error which is tolerable.
|
||||
*/
|
||||
void SetTolerance(const Pose2d& tolerance);
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ class LinearPlantInversionFeedforward {
|
||||
/**
|
||||
* Constructs a feedforward with the given plant.
|
||||
*
|
||||
* @param plant The plant being controlled.
|
||||
* @param dtSeconds Discretization timestep.
|
||||
* @param plant The plant being controlled.
|
||||
* @param dt Discretization timestep.
|
||||
*/
|
||||
template <int Outputs>
|
||||
LinearPlantInversionFeedforward(
|
||||
@@ -42,9 +42,9 @@ class LinearPlantInversionFeedforward {
|
||||
/**
|
||||
* Constructs a feedforward with the given coefficients.
|
||||
*
|
||||
* @param A Continuous system matrix of the plant being controlled.
|
||||
* @param B Continuous input matrix of the plant being controlled.
|
||||
* @param dtSeconds Discretization timestep.
|
||||
* @param A Continuous system matrix of the plant being controlled.
|
||||
* @param B Continuous input matrix of the plant being controlled.
|
||||
* @param dt Discretization timestep.
|
||||
*/
|
||||
LinearPlantInversionFeedforward(
|
||||
const Eigen::Matrix<double, States, States>& A,
|
||||
@@ -64,7 +64,7 @@ class LinearPlantInversionFeedforward {
|
||||
/**
|
||||
* Returns an element of the previously calculated feedforward.
|
||||
*
|
||||
* @param row Row of uff.
|
||||
* @param i Row of uff.
|
||||
*
|
||||
* @return The row of the calculated feedforward.
|
||||
*/
|
||||
|
||||
@@ -159,7 +159,7 @@ class WPILIB_DLLEXPORT PIDController
|
||||
* Sets the error which is considered tolerable for use with AtSetpoint().
|
||||
*
|
||||
* @param positionTolerance Position error which is tolerable.
|
||||
* @param velociytTolerance Velocity error which is tolerable.
|
||||
* @param velocityTolerance Velocity error which is tolerable.
|
||||
*/
|
||||
void SetTolerance(
|
||||
double positionTolerance,
|
||||
|
||||
@@ -179,6 +179,7 @@ class WPILIB_DLLEXPORT DifferentialDrivePoseEstimator {
|
||||
* Note that this should be called every loop iteration.
|
||||
*
|
||||
* @param gyroAngle The current gyro angle.
|
||||
* @param wheelSpeeds The velocities of the wheels in meters per second.
|
||||
* @param leftDistance The distance traveled by the left encoder.
|
||||
* @param rightDistance The distance traveled by the right encoder.
|
||||
*
|
||||
@@ -194,6 +195,7 @@ class WPILIB_DLLEXPORT DifferentialDrivePoseEstimator {
|
||||
*
|
||||
* @param currentTime The time at which this method was called.
|
||||
* @param gyroAngle The current gyro angle.
|
||||
* @param wheelSpeeds The velocities of the wheels in meters per second.
|
||||
* @param leftDistance The distance traveled by the left encoder.
|
||||
* @param rightDistance The distance traveled by the right encoder.
|
||||
*
|
||||
|
||||
@@ -49,7 +49,7 @@ class WPILIB_DLLEXPORT MecanumDrivePoseEstimator {
|
||||
* Constructs a MecanumDrivePoseEstimator.
|
||||
*
|
||||
* @param gyroAngle The current gyro angle.
|
||||
* @param initialPoseMeters The starting pose estimate.
|
||||
* @param initialPose The starting pose estimate.
|
||||
* @param kinematics A correctly-configured kinematics object
|
||||
* for your drivetrain.
|
||||
* @param stateStdDevs Standard deviations of model states.
|
||||
@@ -102,8 +102,8 @@ class WPILIB_DLLEXPORT MecanumDrivePoseEstimator {
|
||||
* <p>The gyroscope angle does not need to be reset in the user's robot code.
|
||||
* The library automatically takes care of offsetting the gyro angle.
|
||||
*
|
||||
* @param poseMeters The position on the field that your robot is at.
|
||||
* @param gyroAngle The angle reported by the gyroscope.
|
||||
* @param pose The position on the field that your robot is at.
|
||||
* @param gyroAngle The angle reported by the gyroscope.
|
||||
*/
|
||||
void ResetPosition(const Pose2d& pose, const Rotation2d& gyroAngle);
|
||||
|
||||
@@ -191,9 +191,9 @@ class WPILIB_DLLEXPORT MecanumDrivePoseEstimator {
|
||||
* information. This should be called every loop, and the correct loop period
|
||||
* must be passed into the constructor of this class.
|
||||
*
|
||||
* @param currentTimeSeconds Time at which this method was called, in seconds.
|
||||
* @param gyroAngle The current gyroscope angle.
|
||||
* @param wheelSpeeds The current speeds of the mecanum drive wheels.
|
||||
* @param currentTime Time at which this method was called, in seconds.
|
||||
* @param gyroAngle The current gyroscope angle.
|
||||
* @param wheelSpeeds The current speeds of the mecanum drive wheels.
|
||||
* @return The estimated pose of the robot in meters.
|
||||
*/
|
||||
Pose2d UpdateWithTime(units::second_t currentTime,
|
||||
|
||||
@@ -51,7 +51,7 @@ class SwerveDrivePoseEstimator {
|
||||
* Constructs a SwerveDrivePoseEstimator.
|
||||
*
|
||||
* @param gyroAngle The current gyro angle.
|
||||
* @param initialPoseMeters The starting pose estimate.
|
||||
* @param initialPose The starting pose estimate.
|
||||
* @param kinematics A correctly-configured kinematics object
|
||||
* for your drivetrain.
|
||||
* @param stateStdDevs Standard deviations of model states.
|
||||
|
||||
@@ -8,10 +8,25 @@
|
||||
|
||||
#include "Eigen/Core"
|
||||
|
||||
/**
|
||||
* Formatter for Eigen::Matrix<>.
|
||||
*
|
||||
* @tparam Rows Number of rows.
|
||||
* @tparam Cols Number of columns.
|
||||
* @tparam Args Defaulted template arguments to Eigen::Matrix<>.
|
||||
*/
|
||||
template <int Rows, int Cols, int... Args>
|
||||
struct fmt::formatter<Eigen::Matrix<double, Rows, Cols, Args...>> {
|
||||
/**
|
||||
* Storage for format specifier.
|
||||
*/
|
||||
char presentation = 'f';
|
||||
|
||||
/**
|
||||
* Format string parser.
|
||||
*
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
constexpr auto parse(fmt::format_parse_context& ctx) {
|
||||
auto it = ctx.begin(), end = ctx.end();
|
||||
if (it != end && (*it == 'f' || *it == 'e')) {
|
||||
@@ -25,6 +40,13 @@ struct fmt::formatter<Eigen::Matrix<double, Rows, Cols, Args...>> {
|
||||
return it;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes out a formatted matrix.
|
||||
*
|
||||
* @tparam FormatContext Format string context type.
|
||||
* @param mat Matrix to format.
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
template <typename FormatContext>
|
||||
auto format(const Eigen::Matrix<double, Rows, Cols, Args...>& mat,
|
||||
FormatContext& ctx) {
|
||||
|
||||
@@ -8,9 +8,28 @@
|
||||
|
||||
#include "units/base.h"
|
||||
|
||||
/**
|
||||
* Formatter for unit types.
|
||||
*
|
||||
* @tparam Units Unit tag for which type of units the `unit_t` represents (e.g.
|
||||
* meters).
|
||||
* @tparam T Underlying type of the storage. Defaults to double.
|
||||
* @tparam NonLinearScale Optional scale class for the units. Defaults to linear
|
||||
* (i.e. does not scale the unit value). Examples of
|
||||
* non-linear scales could be logarithmic, decibel, or
|
||||
* richter scales. Non-linear scales must adhere to the
|
||||
* non-linear-scale concept.
|
||||
*/
|
||||
template <class Units, typename T, template <typename> class NonLinearScale>
|
||||
struct fmt::formatter<units::unit_t<Units, T, NonLinearScale>>
|
||||
: fmt::formatter<double> {
|
||||
/**
|
||||
* Writes out a formatted unit.
|
||||
*
|
||||
* @tparam FormatContext Format string context type.
|
||||
* @param obj Unit instance.
|
||||
* @param ctx Format string context.
|
||||
*/
|
||||
template <typename FormatContext>
|
||||
auto format(const units::unit_t<Units, T, NonLinearScale>& obj,
|
||||
FormatContext& ctx) {
|
||||
|
||||
@@ -51,8 +51,10 @@ class SwerveDriveKinematics {
|
||||
* pass in the module states in the same order when calling the forward
|
||||
* kinematics methods.
|
||||
*
|
||||
* @param wheels The locations of the wheels relative to the physical center
|
||||
* of the robot.
|
||||
* @param wheel The location of the first wheel relative to the physical
|
||||
* center of the robot.
|
||||
* @param wheels The locations of the other wheels relative to the physical
|
||||
* center of the robot.
|
||||
*/
|
||||
template <typename... Wheels>
|
||||
explicit SwerveDriveKinematics(Translation2d wheel, Wheels&&... wheels)
|
||||
@@ -112,8 +114,9 @@ class SwerveDriveKinematics {
|
||||
* @return An array containing the module states. Use caution because these
|
||||
* module states are not normalized. Sometimes, a user input may cause one of
|
||||
* the module speeds to go above the attainable max velocity. Use the
|
||||
* <NormalizeWheelSpeeds> function to rectify this issue. In addition, you can
|
||||
* leverage the power of C++17 to directly assign the module states to
|
||||
* NormalizeWheelSpeeds(wpi::array<SwerveModuleState, NumModules>*,
|
||||
* units::meters_per_second_t) function to rectify this issue. In addition,
|
||||
* you can leverage the power of C++17 to directly assign the module states to
|
||||
* variables:
|
||||
*
|
||||
* @code{.cpp}
|
||||
|
||||
@@ -106,9 +106,9 @@ class LinearSystem {
|
||||
* This is used by state observers directly to run updates based on state
|
||||
* estimate.
|
||||
*
|
||||
* @param x The current state.
|
||||
* @param u The control input.
|
||||
* @param dt Timestep for model update.
|
||||
* @param x The current state.
|
||||
* @param clampedU The control input.
|
||||
* @param dt Timestep for model update.
|
||||
*/
|
||||
Eigen::Vector<double, States> CalculateX(
|
||||
const Eigen::Vector<double, States>& x,
|
||||
|
||||
@@ -37,6 +37,7 @@ class LinearSystemLoop {
|
||||
* call reset with the initial system state before enabling the loop. This
|
||||
* constructor assumes that the input(s) to this system are voltage.
|
||||
*
|
||||
* @param plant State-space plant.
|
||||
* @param controller State-space controller.
|
||||
* @param observer State-space observer.
|
||||
* @param maxVoltage The maximum voltage that can be applied. Commonly 12.
|
||||
|
||||
@@ -21,8 +21,6 @@ class WPILIB_DLLEXPORT TrajectoryUtil {
|
||||
*
|
||||
* @param trajectory the trajectory to export
|
||||
* @param path the path of the file to export to
|
||||
*
|
||||
* @return The interpolated state.
|
||||
*/
|
||||
static void ToPathweaverJson(const Trajectory& trajectory,
|
||||
std::string_view path);
|
||||
@@ -38,19 +36,19 @@ class WPILIB_DLLEXPORT TrajectoryUtil {
|
||||
/**
|
||||
* Deserializes a Trajectory from PathWeaver-style JSON.
|
||||
*
|
||||
* @param json the string containing the serialized JSON
|
||||
* @param trajectory the trajectory to export
|
||||
*
|
||||
* @return the trajectory represented by the JSON
|
||||
* @return the string containing the serialized JSON
|
||||
*/
|
||||
static std::string SerializeTrajectory(const Trajectory& trajectory);
|
||||
|
||||
/**
|
||||
* Serializes a Trajectory to PathWeaver-style JSON.
|
||||
*
|
||||
* @param trajectory the trajectory to export
|
||||
* @param jsonStr the string containing the serialized JSON
|
||||
*
|
||||
* @return the string containing the serialized JSON
|
||||
* @return the trajectory represented by the JSON
|
||||
*/
|
||||
static Trajectory DeserializeTrajectory(std::string_view json_str);
|
||||
static Trajectory DeserializeTrajectory(std::string_view jsonStr);
|
||||
};
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user