@@ -26,7 +26,7 @@ def get_default_differential_drive(cls):
2626
2727 return cls ._DEFAULT_DIFFERENTIAL_DRIVE_INSTANCE
2828
29- def __init__ (self , left_motor : EncodedMotor , right_motor : EncodedMotor , imu : IMU | None = None , wheel_diam :float = 6.0 , wheel_track :float = 13 .5 ):
29+ def __init__ (self , left_motor : EncodedMotor , right_motor : EncodedMotor , imu : IMU | None = None , wheel_diam :float = 6.0 , wheel_track :float = 15 .5 ):
3030 """
3131 A Differential Drive class designed for the XRP two-wheeled drive robot.
3232
@@ -36,9 +36,9 @@ def __init__(self, left_motor: EncodedMotor, right_motor: EncodedMotor, imu: IMU
3636 :type rightMotor: EncodedMotor
3737 :param imu: The IMU of the robot. If None, the robot will not use the IMU for turning or maintaining heading.
3838 :type imu: IMU
39- :param wheelDiam: The diameter of the wheels in inches. Defaults to 6 inches .
39+ :param wheelDiam: The diameter of the wheels in inches. Defaults to 6 cm .
4040 :type wheelDiam: float
41- :param wheelTrack: The distance between the wheels in inches. Defaults to 13 .5 inches .
41+ :param wheelTrack: The distance between the wheels in inches. Defaults to 15 .5 cm .
4242 :type wheelTrack: float
4343 """
4444
@@ -110,12 +110,12 @@ def get_right_encoder_position(self) -> float:
110110 def straight (self , distance : float , max_effort : float = 0.5 , timeout : float = None , main_controller : Controller = None , secondary_controller : Controller = None ) -> bool :
111111 """
112112 Go forward the specified distance in centimeters, and exit function when distance has been reached.
113- Speed is bounded from -1 (reverse at full speed) to 1 (forward at full speed)
113+ Max_effort is bounded from -1 (reverse at full speed) to 1 (forward at full speed)
114114
115115 :param distance: The distance for the robot to travel (In Centimeters)
116116 :type distance: float
117- :param speed : The speed for which the robot to travel (Bounded from -1 to 1). Default is half speed forward
118- :type speed : float
117+ :param max_effort : The max effort for which the robot to travel (Bounded from -1 to 1). Default is half effort forward
118+ :type max_effort : float
119119 :param timeout: The amount of time before the robot stops trying to move forward and continues to the next step (In Seconds)
120120 :type timeout: float
121121 :param main_controller: The main controller, for handling the distance driven forwards
@@ -125,8 +125,8 @@ def straight(self, distance: float, max_effort: float = 0.5, timeout: float = No
125125 :return: if the distance was reached before the timeout
126126 :rtype: bool
127127 """
128- # ensure distance is always positive while speed could be either positive or negative
129- if distance < 0 :
128+ # ensure effort is always positive while distance could be either positive or negative
129+ if max_effort < 0 :
130130 max_effort *= - 1
131131 distance *= - 1
132132
@@ -199,8 +199,8 @@ def turn(self, turn_degrees: float, max_effort: float = 0.5, timeout: float = No
199199
200200 :param turnDegrees: The number of angle for the robot to turn (In Degrees)
201201 :type turnDegrees: float
202- :param speed : The speed for which the robot to travel (Bounded from -1 to 1). Default is half speed forward.
203- :type speed : float
202+ :param max_effort : The max effort for which the robot to travel (Bounded from -1 to 1). Default is half effort forward.
203+ :type max_effort : float
204204 :param timeout: The amount of time before the robot stops trying to turn and continues to the next step (In Seconds)
205205 :type timeout: float
206206 :param main_controller: The main controller, for handling the angle turned
0 commit comments