コード例 #1
0
 def msg_callback_left_finger(self, msg):
     
     out_msg = JointState()
     out_msg.header = msg.header
     out_msg.goal_pos = msg.set_point
     out_msg.current_pos = msg.process_value
     out_msg.error = msg.error
     #we still need to obtain the speed information about the joint...
     #motor IDs are filled according to a joint of the arm
     out_msg.motor_ids.append(8)
     #other stuff that is not known
     out_msg.load=0
     out_msg.is_moving=0 # we should obtain this information somehow
     out_msg.motor_temps.append(0)
     self.pub_left_finger.publish(out_msg)