Abstract class for grippers to support hardware-agnostic applications - #64
Abstract class for grippers to support hardware-agnostic applications#64hello-garv wants to merge 17 commits into
Conversation
hello-robot-shehab
left a comment
There was a problem hiding this comment.
I like the idea behind this!
A few thoughts for later discussion:
- Can gripper_metadata.py just replace gripper_conversion.py? It looks like they have similar methods
- Need to port gripper status and gamepad teleop to use this abstracted and conversion logic.
|
|
||
| @property | ||
| @abstractmethod | ||
| def subsystem_range(self) -> tuple[float, float]: |
There was a problem hiding this comment.
Is it possible to rename subsystem to servo or motor to keep the naming the same as the current implementation in gripper_conversion.py?
| @abstractmethod | ||
| def finger_joints(self) -> List[str]: | ||
| """List of finger joint names in URDF""" | ||
| pass |
There was a problem hiding this comment.
Might be cleaner to throw NotImplementedError instead of a None return, in addition to the abstract decorator.
| joints.append(RobotJoints.gripper) | ||
| return joints | ||
|
|
||
| def to_subsystem_units(self, position: float) -> float: |
There was a problem hiding this comment.
It would be helpful to have one-line docstrings for the conversion methods like this one, or to add associated documentation for what each unit type means.
There was a problem hiding this comment.
this would be similar to the docstrings in the GripperMetadata(ABC)
|
I really like this design - it appears to be straightforward to instantiate and register a new custom gripper in the future. |
|
@hello-garv Does this need my review? Do you have testing instructions? |
|
@hello-garv would it make sense to add a See Shehab's comment here: #92 (comment) |
* Added support for custom user tools in ~/stretch_user/user_tools * Support for gamepad, collision and better params loading * Fixed rebase artifact not allowing robot client to use custom tool * Fixed the user_tools filenames so they are the same across custom tools * stretch_gripper_home and _jog now work * custom tools now have pose models * Fixed bug with gamepad teleop not using CommandGripperPosition for custom tools. Added support for subsystem_to_urdf conversion * Fix user-defined end-of-arm tools in teleop, motion, and collision (#134) * Resolve a custom tool's gamepad command class by convention and disable gripper teleop when none is defined * Treat a joint with req_calibration disabled as homed so its soft motion limits resolve instead of raising a TypeError * Cache user tool collision mappers with retry on failure and map raw status in one place * Respect a custom gripper client's own pct convention instead of overwriting it with the Stretch Gripper formula * Some modifications from the merged PR * Fixed WristJointClient.status recursion bug * Cleaned up gamepad teleop logic for loading custom tools * Fixed auto-detect not working with custom tools --------- Co-authored-by: Bharadwaj Chukkala <bharadwaj@hello-robot.com>
1e08af1 to
672e878
Compare
Summary:
Added a new gripper metadata object that stores gripper-specific properties like finger joint and link names, subsystem client, and unit conversions. The gripper metadata is used by RobotJoints to return robot-specific properties without needing to hardcode the gripper name.