def get_current_gripper_status(self): """ Public function to obtain the current gripper status. Returns: Instance of `robotiq_2f_gripper_msgs/RobotiqGripperStatus` message. See the message declaration for fields description """ status = RobotiqGripperStatus() status.header.stamp = rospy.get_rostime() status.header.seq = self._seq status.is_ready = self._gripper.is_ready() status.is_reset = self._gripper.is_reset() status.is_moving = self._gripper.is_moving() status.obj_detected = self._gripper.object_detected() status.fault_status = self._gripper.get_fault_status() status.position = self._gripper.get_pos() status.requested_position = self._gripper.get_req_pos() status.current = self._gripper.get_current() return status
def get_current_gripper_status(self): """ Public function to obtain the current gripper status. Returns: Instance of `robotiq_2f_gripper_msgs/RobotiqGripperStatus` message. See the message declaration for fields description """ status = RobotiqGripperStatus() status.header.stamp = rospy.get_rostime() status.header.seq = 0 status.is_ready = True status.is_reset = False status.is_moving = self._is_moving status.obj_detected = False status.fault_status = False status.position = self.from_radians_to_distance(self._current_joint_pos) #[mm] status.requested_position = self._current_goal.position #[mm] status.current = 0.0 return status