From 95e61c469ed7bad111e1e24cece1aff6ea38ec9a Mon Sep 17 00:00:00 2001 From: LeProblemeEDMN <72100759+LeProblemeEDMN@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:03:46 +0000 Subject: [PATCH] Update wheeledbase.py --- raspberrypi/daughter_cards/wheeledbase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raspberrypi/daughter_cards/wheeledbase.py b/raspberrypi/daughter_cards/wheeledbase.py index aadaadb..dd989be 100644 --- a/raspberrypi/daughter_cards/wheeledbase.py +++ b/raspberrypi/daughter_cards/wheeledbase.py @@ -342,6 +342,8 @@ def goto_stop(self, x, y,sensors, theta=None, direction=None, finalangle=None, l # Get the setpoint orientation if theta is not None: + if(theta<0): + theta+=2*math.pi rPos=self.get_position() radiusRobot=370 ang=rPos[2]%(2*math.pi)