From 15da18f949d12ab738f4fce28345c9025c2ab586 Mon Sep 17 00:00:00 2001 From: spirkelmann Date: Tue, 9 Jul 2019 19:42:19 +0200 Subject: [PATCH] changed marker ids --- remote_control/position_controller.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/remote_control/position_controller.py b/remote_control/position_controller.py index 143112b..2d8f3f0 100644 --- a/remote_control/position_controller.py +++ b/remote_control/position_controller.py @@ -52,16 +52,16 @@ class Track: def __init__(self): # ids in clockwise direction self.inner = OrderedDict() - self.inner[5] = None - self.inner[8] = None - self.inner[7] = None self.inner[1] = None + self.inner[2] = None + self.inner[3] = None + self.inner[4] = None self.outer = OrderedDict() - self.outer[11] = None - self.outer[2] = None - self.outer[4] = None - self.outer[0] = None + self.outer[5] = None + self.outer[6] = None + self.outer[7] = None + self.outer[8] = None self.track_complete = False @@ -369,8 +369,9 @@ class RemoteController: markers_out = self.track.outer.values() # find targets: + lamb = 0.3 for i in range(0,4): - p = (np.array(markers_in[i]) + np.array(markers_out[i]))/2.0 + p = np.array(markers_in[i]) + lamb * (np.array(markers_out[i]) - np.array(markers_in[i])) targets[i] = (p[0],p[1], 0.0) auto_control = False