diff --git a/src/rover.py b/src/rover.py index 3c02c22..89a3d59 100755 --- a/src/rover.py +++ b/src/rover.py @@ -132,7 +132,7 @@ def joystickToSteeringAngle(self, driving_command, steering_command): if(self.locomotion_mode == LocomotionMode.ACKERMANN.value): # No steering if robot is not driving - if(driving_command is 0): + if(driving_command == 0): return steering_angles # Radius: Scale between min and max Ackermann radius @@ -286,7 +286,7 @@ def joystickToVelocity(self, driving_command, steering_command): v_inner = int(v*inner_turning_radius/outer_turning_radius) deg = steering_command - if(driving_command is not 0): + if(driving_command != 0): # Left turn if(deg < 85 and deg > -85): motor_speeds[self.FL] = -v_outer