コード例 #1
0
    def create_learner(self):
        A, B, _ = self.decoder.ssm.get_ssm_matrices(
            update_rate=self.decoder.binlen)

        Q = np.mat(np.diag([1., 1, 1, 0, 0, 0, 0]))
        R = self.cost_fn_scale * np.mat(np.eye(B.shape[1]))
        fb_ctrl = feedback_controllers.LQRController(A, B, Q, R)
        self.learner = clda.FeedbackControllerLearner(1, fb_ctrl)
        self.learn_flag = True
コード例 #2
0
 def create_learner(self):
     F, K = self.decoder.filt.get_sskf()
     pos_gain = np.mean(K[[0, 2], :] / K[[3, 5], :])
     I = np.mat(np.eye(3))
     B = np.mat(np.vstack([pos_gain * I, I, np.zeros(3)]))
     A = np.mat(F)
     Q = np.mat(np.diag([1., 1, 1, 0, 0, 0, 0]))
     R = np.mat(np.eye(3) * 1000)
     fb_ctrl = feedback_controllers.LQRController(A, B, Q, R)
     self.batch_size = int(self.batch_time / self.decoder.binlen)
     self.learner = clda.FeedbackControllerLearner(self.batch_size,
                                                   fb_ctrl,
                                                   style='additive')
コード例 #3
0
 def create_learner(self):
     self.batch_size = int(self.batch_time/self.decoder.binlen)
     fb_ctrl = JointTorque2LController()
     self.learner = clda.FeedbackControllerLearner(self.batch_size, fb_ctrl)
     self.learn_flag = True
コード例 #4
0
 def create_learner(self):
     self.batch_size = int(self.batch_time/self.decoder.binlen)
     fb_ctrl = MSKController()
     self.learner = clda.FeedbackControllerLearner(self.batch_size, fb_ctrl, style='mixing')
     self.learn_flag = True
コード例 #5
0
 def create_learner(self):
     self.batch_size = int(self.batch_time/self.decoder.binlen)
     self.learner = clda.FeedbackControllerLearner(self.batch_size, mouse_motion_model)
     self.learn_flag = True
コード例 #6
0
 def create_learner(self):
     from tasks.point_mass_cursor import PointMassFBController
     self.batch_size = int(self.batch_time/self.decoder.binlen)
     fb_ctrl = PointMassFBController()
     self.learner = clda.FeedbackControllerLearner(self.batch_size, fb_ctrl)
     self.learn_flag = True
コード例 #7
0
 def create_learner(self):
     self.batch_size = int(self.batch_time/self.decoder.binlen)
     self.learner = clda.FeedbackControllerLearner(self.batch_size, joint_vel_fb_ctrl, reset_states=['go_to_origin', 'wait', 'init_exo', 'move_target', 'pause', 'reward' ])
     self.learn_flag = True