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 _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