Пример #1
0
 def _update_gripper_stat(self, dev=0):
     stat = GripperStat()
     stat.header.stamp = rospy.get_rostime()
     stat.header.seq = self._seq[dev]
     stat.is_ready = self._gripper.is_ready(dev)
     stat.is_reset = self._gripper.is_reset(dev)
     stat.is_moving = self._gripper.is_moving(dev)
     stat.obj_detected = self._gripper.object_detected(dev)
     stat.fault_status = self._gripper.get_fault_status(dev)
     stat.position = self._gripper.get_pos(dev)
     stat.requested_position = self._gripper.get_req_pos(dev)
     stat.current = self._gripper.get_current(dev)
     self._seq[dev] += 1
     return stat
Пример #2
0
 def _update_gripper_stat(self, position):
     stat = GripperStat()
     stat.header.stamp = rospy.get_rostime()
     stat.header.seq = self._seq
     stat.is_ready = self._driver_ready
     stat.is_reset = False
     stat.is_moving = False
     stat.obj_detected = False
     stat.fault_status = self._driver_state
     stat.position = position
     stat.requested_position = position
     stat.current = 0
     self._seq += 1
     return stat
 def _update_gripper_stat(self,dev=0):
     stat = GripperStat()
     stat.header.stamp = rospy.get_rostime()
     stat.header.seq = self._seq[dev]
     stat.is_ready = self._gripper.is_ready(dev)
     stat.is_reset = self._gripper.is_reset(dev)
     stat.is_moving = self._gripper.is_moving(dev)
     stat.obj_detected = self._gripper.object_detected(dev)
     stat.fault_status = self._gripper.get_fault_status(dev)
     stat.position = self._gripper.get_pos(dev)
     stat.requested_position = self._gripper.get_req_pos(dev)
     stat.current = self._gripper.get_current(dev)
     self._seq[dev]+=1
     return stat
    def _create_gripper_stat_msg(self, dev):
        """
        create a GripperState ROS message based on current status of gripper
        """

        stat = GripperStat()
        stat.header.stamp = rospy.get_rostime()
        stat.header.seq = self._seq[dev]
        stat.is_ready = self._gripper.is_ready(dev)
        stat.is_reset = self._gripper.is_reset(dev)
        stat.is_moving = self._gripper.is_moving(dev)
        stat.obj_detected = self._gripper.object_detected(dev)
        stat.fault_status = self._gripper.get_fault_status(dev)
        stat.position = self._gripper.get_pos(dev)
        stat.requested_position = self._gripper.get_req_pos(dev)
        stat.current = self._gripper.get_current(dev)
        self._seq[dev] += 1
        return stat