def run(self): for i in range(2, core.NUM_JOINTS): val = util.getPoseJoint(i, self.pose, self.reverse) if val != None: joint_commands.setJointCommand(i, val * core.DEG_T_RAD) joint_commands.send_body_angles_ = True joint_commands.body_angle_time = self.time * 1000.0 walk_request.noWalk() kick_request.setNoKick() if self.getTime() > self.time: self.finish()
def run(self): for i in range(2, core.NUM_JOINTS): val = util.getPoseJoint(i, self.pose) if val != None: core.joint_commands.setJointCommand(i, val * core.DEG_T_RAD) core.joint_commands.send_body_angles_ = True core.joint_commands.body_angle_time = self.time * 1000.0 core.walk_request.noWalk() core.kick_request.setNoKick() if self.getTime() > self.time: self.finish()
def run(self): if self.first: for i in range(2, core.NUM_JOINTS): val = util.getPoseJoint(i, self.pose, self.reverse) if val != None: joint_commands.setJointCommand(i, val * core.DEG_T_RAD) joint_commands.send_body_angles_ = True joint_commands.body_angle_time_ = self.time * self.interpolate #1000.0 walk_request.noWalk() kick_request.setNoKick() self.first = False if self.getTime() > self.time: self.finish()
def toPose(self, pose, time): global pose_sent, pose_start_time, num_times_sent commands.setStiffness() times_to_send = 1 if num_times_sent < times_to_send: for i in range(2, core.NUM_JOINTS): val = util.getPoseJoint(i, pose, False) if val != None: joint_commands.setJointCommand(i, val * core.DEG_T_RAD) joint_commands.send_body_angles_ = True joint_commands.body_angle_time_ = time * 1000.0 walk_request.noWalk() kick_request.setNoKick() num_times_sent = num_times_sent+1 pose_start_time = self.getTime() #print "Sending pose at time " + str(pose_start_time) + "! #" + str(num_times_sent) if num_times_sent >= times_to_send and ((self.getTime() - pose_start_time) > time): #print "DONE!" return True else: return False
def toPose(self, pose, time): global pose_sent, pose_start_time, num_times_sent commands.setStiffness() times_to_send = 1 if num_times_sent < times_to_send: for i in range(2, core.NUM_JOINTS): val = util.getPoseJoint(i, pose, False) if val != None: joint_commands.setJointCommand(i, val * core.DEG_T_RAD) joint_commands.send_body_angles_ = True joint_commands.body_angle_time_ = time * 1000.0 walk_request.noWalk() kick_request.setNoKick() num_times_sent = num_times_sent + 1 pose_start_time = self.getTime() #print "Sending pose at time " + str(pose_start_time) + "! #" + str(num_times_sent) if num_times_sent >= times_to_send and ( (self.getTime() - pose_start_time) > time): #print "DONE!" return True else: return False