mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpimath] Change kinematics.ToTwist2d(end - start) to kinematics.ToTwist2d(start, end) (#5493)
This commit is contained in:
@@ -83,9 +83,9 @@ class WPILIB_DLLEXPORT DifferentialDriveKinematics
|
||||
(rightDistance - leftDistance) / trackWidth * 1_rad};
|
||||
}
|
||||
|
||||
Twist2d ToTwist2d(
|
||||
const DifferentialDriveWheelPositions& wheelDeltas) const override {
|
||||
return ToTwist2d(wheelDeltas.left, wheelDeltas.right);
|
||||
Twist2d ToTwist2d(const DifferentialDriveWheelPositions& start,
|
||||
const DifferentialDriveWheelPositions& end) const override {
|
||||
return ToTwist2d(end.left - start.left, end.right - start.right);
|
||||
}
|
||||
|
||||
units::meter_t trackWidth;
|
||||
|
||||
Reference in New Issue
Block a user