Skip to content

Commit 1497e83

Browse files
committed
Add arm.gripper_position_detector.min_position to compare
1 parent f31614e commit 1497e83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

robot_skills/src/robot_skills/arm/gripper_position_detector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88

99
class GripperPositionDetector(RobotPart):
10-
def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str) -> None:
10+
def __init__(self, robot_name: str, tf_buffer: str, joint_topic: str, min_position: float) -> None:
1111
"""
1212
Class for getting the position of the hand motor joint (how much the gripper is open or closed)
1313
Values go from 1 (open) to -1 (closed)
1414
1515
:param robot_name: Name of the robot
1616
:param tf_buffer: tf2_ros.Buffer for use in RobotPart
1717
:param joint_topic: Topic to use for measurement
18+
:param min_position: Range value from -1.0 (gripper fully opened) to 1.0 (closed fully closed)
1819
"""
1920

2021
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:
2425
self.current_position = None
2526
self.store_position = False # Flag to store the position
2627
self.start_time = None
28+
self.min_position = min_position
2729

2830
def _joint_callback(self, msg: JointState) -> None:
2931
"""

0 commit comments

Comments
 (0)