From 3698d76c19d7d34e410dfcb3307a094d042a94b3 Mon Sep 17 00:00:00 2001 From: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com> Date: Thu, 29 Dec 2022 12:47:23 +0100 Subject: [PATCH] Fix is / is not --- src/rover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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