Fixed some typos in odometry.py.

This commit is contained in:
d3rped 2018-03-24 19:20:44 +01:00
parent cdb6ddc683
commit 0d2b5549c6

View file

@ -49,6 +49,7 @@ class Odometry:
self._pi = math.pi
self._posxy = [0, 0]
self._distance = [0, 0]
self._wheel_center = 0
self._v_length = 0
self._v_angle = Direction.NORTH
@ -69,7 +70,7 @@ class Odometry:
self._v_length = self._v_length + (self._distance[0] + self._distance[1])/2
self._v_angle = self._v_angle + (self._distance[0] - self._distance[1])/self._wheel_axis
self.coordinates_update()
self._wheel_center = self._distance[0] + self._distance[1])/2
self._wheel_center = (self._distance[0] + self._distance[1])/2
print((self._v_length, angle2dir(self._v_angle)))
def coordinates_update(self): # worked as function outside the class