diff --git a/robot_skills/src/robot_skills/arm/gripper_position_detector.py b/robot_skills/src/robot_skills/arm/gripper_position_detector.py index 74a44097c2..96bbcb9ff2 100644 --- a/robot_skills/src/robot_skills/arm/gripper_position_detector.py +++ b/robot_skills/src/robot_skills/arm/gripper_position_detector.py @@ -7,7 +7,7 @@ class GripperPositionDetector(RobotPart): - def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str) -> None: + def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str, min_position: float) -> None: """ Class for getting the position of the hand motor joint (how much the gripper is open or closed) Values go from 1 (open) to -1 (closed) @@ -15,6 +15,7 @@ def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str) -> None: :param robot_name: Name of the robot :param tf_buffer: tf2_ros.Buffer for use in RobotPart :param joint_topic: Topic to use for measurement + :param min_position: Range value from -1.0 (gripper fully opened) to 1.0 (closed fully closed) """ super(GripperPositionDetector, self).__init__(robot_name=robot_name, tf_buffer=tf_buffer) @@ -24,6 +25,7 @@ def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str) -> None: self.current_position = None self.store_position = False # Flag to store the position self.start_time = None + self.min_position = min_position def _joint_callback(self, msg: JointState) -> None: """