From 78e010f2333cd4d9304a46ba9377921a3b624590 Mon Sep 17 00:00:00 2001 From: LeProblemeEDMN <72100759+LeProblemeEDMN@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:01:22 +0000 Subject: [PATCH] ds --- raspberrypi/daughter_cards/wheeledbase.py | 1 + raspberrypi/tests/wbTest.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/raspberrypi/daughter_cards/wheeledbase.py b/raspberrypi/daughter_cards/wheeledbase.py index 417d805..aadaadb 100644 --- a/raspberrypi/daughter_cards/wheeledbase.py +++ b/raspberrypi/daughter_cards/wheeledbase.py @@ -345,6 +345,7 @@ def goto_stop(self, x, y,sensors, theta=None, direction=None, finalangle=None, l rPos=self.get_position() radiusRobot=370 ang=rPos[2]%(2*math.pi) + print(ang,theta) #fait en sorte que |ang-theta|math.pi): theta-=2*math.pi diff --git a/raspberrypi/tests/wbTest.py b/raspberrypi/tests/wbTest.py index 2003618..ea64d59 100644 --- a/raspberrypi/tests/wbTest.py +++ b/raspberrypi/tests/wbTest.py @@ -32,8 +32,8 @@ print("Sensors:",sensors) wheeledbase.start_match() -wheeledbase.goto_stop(0,0, sensors,finalangle=-math.pi/2) +wheeledbase.goto_stop(0,0, sensors,theta=-math.pi/2) time.sleep(1) -wheeledbase.goto_stop(0,0, sensors,finalangle=0) +wheeledbase.goto_stop(0,0, sensors,theta=0) while 1: print(wheeledbase.get_position(),sensors.get_all_sensors())