Util
pathplannerlib Index / Pathplannerlib / Util
Auto-generated documentation for pathplannerlib.util module.
DriveFeedforwards
Signature
DriveFeedforwards().flip
Flip the feedforwards for the other side of the field. Only does anything if mirrored symmetry is used
Returns
Flipped feedforwards
Signature
DriveFeedforwards().interpolate
Signature
DriveFeedforwards().reverse
Reverse the feedforwards for driving backwards. This should only be used for differential drive robots.
Returns
Reversed feedforwards
Signature
DriveFeedforwards.zeros
Create drive feedforwards consisting of all zeros
Arguments
numModules
- Number of drive modules
Returns
Zero feedforwards
Signature
FieldSymmetry
Signature
FlippingUtil
Signature
FlippingUtil.flipFeedforwardXs
Flip a list of drive feedforward X components for the other side of the field. Only does anything if mirrored symmetry is used
Arguments
feedforwardXs
- List of drive feedforward X components
Returns
The flipped feedforward X components
Signature
FlippingUtil.flipFeedforwardYs
Flip a list of drive feedforward Y components for the other side of the field. Only does anything if mirrored symmetry is used
Arguments
feedforwardYs
- List of drive feedforward Y components
Returns
The flipped feedforward Y components
Signature
FlippingUtil.flipFeedforwards
Flip a list of drive feedforwards for the other side of the field. Only does anything if mirrored symmetry is used
Arguments
feedforwards
- List of drive feedforwards
Returns
The flipped feedforwards
Signature
FlippingUtil.flipFieldPose
Flip a field pose to the other side of the field, maintaining a blue alliance origin
Arguments
pose
- The pose to flip
Returns
The flipped pose
Signature
FlippingUtil.flipFieldPosition
Flip a field position to the other side of the field, maintaining a blue alliance origin
Arguments
pos
- The position to flip
Returns
The flipped position
Signature
FlippingUtil.flipFieldRotation
Flip a field rotation to the other side of the field, maintaining a blue alliance origin
Arguments
rotation
- The rotation to flip
Returns
The flipped rotation
Signature
FlippingUtil.flipFieldSpeeds
Flip field relative chassis speeds for the other side of the field, maintaining a blue alliance origin
Arguments
fieldSpeeds
- Field relative chassis speeds
Returns
Flipped speeds
Signature
calculateRadius
Calculate the curve radius given 3 points on the curve
Arguments
a
- Point Ab
- Point Bc
- Point C
Returns
Curve radius
Signature
cubicLerp
Cubic interpolation between Translation2ds
Arguments
a
- Position 1b
- Position 2c
- Position 3d
- Position 4t
- Interpolation factor (0.0-1.0)
Returns
Interpolated value
Signature
def cubicLerp(
a: Translation2d, b: Translation2d, c: Translation2d, d: Translation2d, t: float
) -> Translation2d: ...
decimal_range
Signature
floatLerp
Interpolate between two floats
Arguments
start_val
- Start valueend_val
- End valuet
- Interpolation factor (0.0-1.0)
Returns
Interpolated value
Signature
poseLerp
Interpolate between two Pose2ds
Arguments
a
- Start valueb
- End valuet
- Interpolation factor (0.0-1.0)
Returns
Interpolated value
Signature
quadraticLerp
Quadratic interpolation between Translation2ds
Arguments
a
- Position 1b
- Position 2c
- Position 3t
- Interpolation factor (0.0-1.0)
Returns
Interpolated value
Signature
def quadraticLerp(
a: Translation2d, b: Translation2d, c: Translation2d, t: float
) -> Translation2d: ...
rotationLerp
Interpolate between two Rotation2ds
Arguments
a
- Start valueb
- End valuet
- Interpolation factor (0.0-1.0)
Returns
Interpolated value
Signature
translation2dFromJson
Signature
translationLerp
Linear interpolation between two Translation2ds
Arguments
a
- Start valueb
- End valuet
- Interpolation factor (0.0-1.0)
Returns
Interpolated value