reapplied commit: 0124e57
This commit is contained in:
parent
d0608fd870
commit
172e368380
2 changed files with 3 additions and 4 deletions
|
@ -59,7 +59,6 @@ class Move:
|
|||
'''
|
||||
Function to correct errors should the robot wander astray
|
||||
'''
|
||||
# Probably redundant because aligning can be done while scanning other paths
|
||||
|
||||
def _aligntoedge(self):
|
||||
pass
|
||||
|
@ -88,6 +87,5 @@ class Move:
|
|||
self._camera.getcolor()
|
||||
if(not isknownstation):
|
||||
print(self._odometry.degree(self._wheel_l.getmovement(), self._wheel_r.getmovement(), 0))
|
||||
# pass # run odometry stuff here
|
||||
self._wheel_l.stop()
|
||||
self._wheel_r.stop()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import time
|
||||
from planet import Direction
|
||||
import math
|
||||
|
||||
'''
|
||||
Documentation:
|
||||
|
@ -45,7 +46,7 @@ class Odometry:
|
|||
elif self.alpha % (2 * self._pi) >= self._pi * 0.25 and self.alpha % (2 * self._pi) < self._pi * 0.5 or self.alpha % (2 * self._pi) >= self._pi * 0.5 and self.alpha % (2 * self._pi) < self._pi * 0.75:
|
||||
return(Direction.EAST, "Distance = ", self.distance)
|
||||
|
||||
elif self.alpha % (2 * self._pi)>=self._pi * 0.75 and self.alpha % (2* self._pi)< self._pi or self.alpha % (2 * self._pi) >=self._pi and self.alpha < self.alpha * 5/4 pi :
|
||||
elif self.alpha % (2 * self._pi) >= self._pi * 0.75 and self.alpha % (2 * self._pi) < self._pi or self.alpha % (2 * self._pi) >= self._pi and self.alpha % (2 * self._pi) < 5 / 4 * self._pi:
|
||||
return(Direction.SOUTH, "Distance = ", self.distance)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue