Config
pathplannerlib Index / Pathplannerlib / Config
Auto-generated documentation for pathplannerlib.config module.
ModuleConfig
Signature
class ModuleConfig:
def __init__(
self,
wheelRadiusMeters: float,
maxDriveVelocityMPS: float,
wheelCOF: float,
driveMotor: DCMotor,
driveCurrentLimit: float,
numMotors: int,
): ...
PIDConstants
PID constants used to create PID controllers
Arguments
kP
float - PkI
float - IkD
float - DiZone
float - Integral range
Signature
RobotConfig
Signature
class RobotConfig:
def __init__(
self,
massKG: float,
MOI: float,
moduleConfig: ModuleConfig,
moduleOffsets: List[Translation2d] = None,
trackwidthMeters: float = None,
): ...
See also
RobotConfig().chassisForcesToWheelForceVectors
Convert chassis forces (passed as ChassisSpeeds) to individual wheel force vectors
Arguments
chassisForces
- The linear X/Y force and torque acting on the whole robot
Returns
List of individual wheel force vectors
Signature
def chassisForcesToWheelForceVectors(
self, chassisForces: ChassisSpeeds
) -> List[Translation2d]: ...
RobotConfig.fromGUISettings
Load the robot config from the shared settings file created by the GUI
Returns
RobotConfig matching the robot settings in the GUI
Signature
RobotConfig().toChassisSpeeds
Convert a list of swerve module states to robot-relative chassis speeds. This will use differential kinematics for diff drive robots.
Arguments
states
- List of swerve module states
Returns
Robot-relative chassis speeds
Signature
RobotConfig().toSwerveModuleStates
Convert robot-relative chassis speeds to a list of swerve module states. This will use differential kinematics for diff drive robots, then convert the wheel speeds to module states.
Arguments
speeds
- Robot-relative chassis speeds
Returns
List of swerve module states