diff --git a/built_in_tasks/bmimultitasks.py b/built_in_tasks/bmimultitasks.py index fbbc0c31..384271b7 100644 --- a/built_in_tasks/bmimultitasks.py +++ b/built_in_tasks/bmimultitasks.py @@ -17,6 +17,7 @@ from .target_capture_task_xt import ScreenReachAngle from features.bmi_task_features import LinearlyDecreasingAssist from .target_graphics import target_colors +from .target_tracking_task import ScreenTargetTracking np.set_printoptions(suppress=False) @@ -265,6 +266,10 @@ def create_goal_calculator(self): else: raise ValueError("Unrecognized decoder state space!") + + def move_effector(self, pos_offset=[0,0,0], vel_offset=[0,0,0]): + pass + def get_target_BMI_state(self, *args): ''' Run the goal calculator to determine the target state of the task @@ -364,6 +369,8 @@ def toggle_clda(self): self.hdf.sendMsg(f"clda = {self.learn_flag}") print(f"clda = {self.learn_flag}") + + class BMIControlMulti2DWindow(BMIControlMultiMixin, WindowDispl2D, ScreenTargetCapture): fps = 20. def __init__(self,*args, **kwargs): @@ -395,4 +402,11 @@ class BMIControlMultiDirectionConstraint(BMIControlMultiMixin, ScreenReachAngle) ''' Adds an additional constraint that the direction of travel must be within a certain angle ''' + pass + + +class BMIControlMulti_ScreenTargetTracking(BMIControlMultiMixin, ScreenTargetTracking): + ''' + BMI control for target tracking task + ''' pass \ No newline at end of file diff --git a/built_in_tasks/target_tracking_task.py b/built_in_tasks/target_tracking_task.py index de6486f9..feffeeb0 100644 --- a/built_in_tasks/target_tracking_task.py +++ b/built_in_tasks/target_tracking_task.py @@ -77,10 +77,10 @@ def init(self): self.repeat_freq_set = False self.gen_index = -1 - if self.velocity_control: - print('VELOCITY CONTROL') - else: - print('POSITION CONTROL') # default is position control - see manualcontrolmixin + #if self.velocity_control: + # print('VELOCITY CONTROL') + #else: + # print('POSITION CONTROL') # default is position control - see manualcontrolmixin self.pos_offset = [0,0,0] self.vel_offset = [0,0,0] @@ -462,7 +462,6 @@ def init(self): self.add_dtype('disturbance', 'f8', (3,)) super().init() self.plant.set_endpoint_pos(np.array(self.starting_pos)) - def _cycle(self): ''' Calls any update functions necessary and redraws screen