mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[copybara] Resync with mostrobotpy (#8662)
This commit is contained in:
@@ -88,7 +88,9 @@ class Drivetrain:
|
||||
self.rightLeader.setInverted(True)
|
||||
wpilib.SmartDashboard.putData("Field", self.fieldSim)
|
||||
|
||||
def setVelocities(self, velocities: wpimath.DifferentialDriveWheelVelocities) -> None:
|
||||
def setVelocities(
|
||||
self, velocities: wpimath.DifferentialDriveWheelVelocities
|
||||
) -> None:
|
||||
"""Sets velocities to the drivetrain motors."""
|
||||
leftFeedforward = self.feedforward.calculate(velocities.left)
|
||||
rightFeedforward = self.feedforward.calculate(velocities.right)
|
||||
@@ -109,7 +111,9 @@ class Drivetrain:
|
||||
:param rot: the rotation
|
||||
"""
|
||||
self.setVelocities(
|
||||
self.kinematics.toWheelVelocities(wpimath.ChassisVelocities(xVelocity, 0, rot))
|
||||
self.kinematics.toWheelVelocities(
|
||||
wpimath.ChassisVelocities(xVelocity, 0, rot)
|
||||
)
|
||||
)
|
||||
|
||||
def updateOdometry(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user