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())