3#include <units/length.h>
4#include <units/angular_velocity.h>
5#include <units/velocity.h>
6#include <units/torque.h>
7#include <units/current.h>
8#include <frc/system/plant/DCMotor.h>
11#define M_PI 3.14159265358979323846
14namespace pathplanner {
17 units::meter_t wheelRadius;
18 units::meters_per_second_t maxDriveVelocityMPS;
20 frc::DCMotor driveMotor;
21 units::ampere_t driveCurrentLimit;
23 units::radians_per_second_t maxDriveVelocityRadPerSec;
25 units::newton_meter_t torqueLoss;
44 units::meters_per_second_t maxDriveVelocityMPS,
double wheelCOF,
45 frc::DCMotor driveMotor, units::ampere_t driveCurrentLimit,
46 int numMotors) : wheelRadius(wheelRadius), maxDriveVelocityMPS(
47 maxDriveVelocityMPS), wheelCOF(wheelCOF), driveMotor(driveMotor), driveCurrentLimit(
48 driveCurrentLimit * numMotors), maxDriveVelocityRadPerSec {
49 maxDriveVelocityMPS() / wheelRadius() }, torqueLoss(
54 maxDriveVelocityRadPerSec, 12_V),
55 driveCurrentLimit)), 0_Nm)) {
73 units::meters_per_second_t maxDriveVelocityMPS,
double wheelCOF,
74 frc::DCMotor driveMotor,
double driveGearing,
75 units::ampere_t driveCurrentLimit,
int numMotors) :
ModuleConfig(
76 wheelRadius, maxDriveVelocityMPS, wheelCOF,
77 driveMotor.WithReduction(driveGearing), driveCurrentLimit,
Definition: ModuleConfig.h:15
ModuleConfig(units::meter_t wheelRadius, units::meters_per_second_t maxDriveVelocityMPS, double wheelCOF, frc::DCMotor driveMotor, units::ampere_t driveCurrentLimit, int numMotors)
Definition: ModuleConfig.h:43
ModuleConfig(units::meter_t wheelRadius, units::meters_per_second_t maxDriveVelocityMPS, double wheelCOF, frc::DCMotor driveMotor, double driveGearing, units::ampere_t driveCurrentLimit, int numMotors)
Definition: ModuleConfig.h:72