Kp[5, 5] = Kp_ankle Kd[5, 5] = Kd_ankle _client = Client() _client.connect() rate = rospy.Rate(1000) joints = [ 'Hip-RobLeftThigh', 'RobLeftThigh-RobLeftShank', 'RobLeftShank-RobLeftFoot', 'Hip-RobRightThigh', 'RobRightThigh-RobRightShank', 'RobRightShank-RobRightFoot', 'Hip-Crutches' ] #joints = ['Hip-Leftthigh', 'Leftthigh-Leftshank', 'Leftshank-Leftfoot', 'Hip-Rightthigh', 'Rightthigh-Rightshank', 'Rightshank-Rightfoot', 'Hip-Cylinder'] LARRE = Exoskeleton.Exoskeleton(_client, joints, 56, 1.56) Dyn = DynController.DynController(LARRE, Kp, Kd) mpc = MPCController.MPCController(LARRE, LARRE.get_runner()) # lqr = LQRController.LQRController(LARRE, LARRE.get_runner()) # controllers = {'Dyn': Dyn, # "LQR":lqr} # lqr = LQRController.LQRController(LARRE, LARRE.get_runner()) FF = FeedForwardController.FeedForwardController(LARRE, Kp, Kd) controllers = {'Dyn': Dyn, "MPC": mpc, "FF": FF} cnrl = ControllerNode.ControllerNode(LARRE, controllers)
#!/usr/bin/env python import sys from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from ambf_walker.msg import DesiredJoints from StateMachines import StateMachine from Controller import ControllerNode from Model import Exoskeleton import rospy from ambf_client import Client _client = Client() _client.connect() rate = rospy.Rate(1000) LARRE = Exoskeleton.Exoskeleton(_client, 56, 1.56) cnrl = ControllerNode.ControllerNode(LARRE) machine = StateMachine.ExoStateMachineTest(LARRE)
Kp[4, 4] = Kp_knee Kd[4, 4] = Kd_knee Kp[5, 5] = Kp_ankle Kd[5, 5] = Kd_ankle _client = Client() _client.connect() rate = rospy.Rate(1000) body_joints = ['HumanLeftHip', 'HumanLeftKnee', 'HumanLeftAnkle', 'HumanRightHip', 'HumanRightKnee', 'HumanRightAnkle'] robot_joints = ['ExoLeftHip', 'ExoLeftKnee', 'ExoLeftAnkle', 'ExoRightHip', 'ExoRightKnee', 'ExoRightAnkle', 'ExoHipCrutches'] LARRY = Human.Human(_client, "human", body_joints, 0, 0) LARRE = Exoskeleton.Exoskeleton(_client, "exo", robot_joints, 56, 1.56) # LARRE.handle.set_rpy(0.25, 0, 0) # LARRE.handle.set_pos(0, 0, 1.0) Dyn = DynController.DynController(LARRE, Kp, Kd) # chair_handle = _client.get_obj_handle('Chair') # chair_handle.set_pos(0.0, 0.35, -0.55) # chair_handle.set_rpy(0.0, 0.0, 0.0) time.sleep(5) #mpc = MPController.MPController(LARRE, LARRE.get_runner()) # lqr = LQRController.LQRController(LARRE, LARRE.get_runner()) # controllers = {'Dyn': Dyn,