Skip to content

[RSDK-10924] Add IsHoldingSomething to Gripper API #935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

gvaradarajan
Copy link
Member

No description provided.

@gvaradarajan gvaradarajan requested a review from a team as a code owner June 13, 2025 17:51
@gvaradarajan gvaradarajan requested review from stuqdog and lia-viam June 13, 2025 17:51
Copy link
Contributor

Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!

component function
base is_moving
board gpio_pin_by_name
camera get_image
encoder get_position
motor is_moving
sensor get_readings
servo get_position
switch get_position
arm get_end_position
gantry get_lengths
gripper is_moving
movement_sensor get_linear_acceleration
input_controller get_controls
audio get_properties
pose_tracker get_poses
power_sensor get_power
motion get_pose
vision get_properties
mlmodel metadata
slam get_point_cloud_map

Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change request

from typing import Any, Dict, Final, Optional, Tuple

from viam.components.component_base import ComponentBase
from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT

from . import KinematicsFileFormat

@dataclass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this inside of Gripper? that way this class is Gripper.HoldingStatus?

I don't think this class makes sense outside the context of a gripper

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo Naveed's comment and a question for my own understanding.

# Grab with the gripper.
holding_status = await my_gripper.is_holding_something()
# get the boolean result
is_holding_something = holding_status.is_holding_something
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(q) naively, is_holding_something is the only thing I care about here and I don't understand what the meta field does at all, so this looks to me like we're just asking for an extra step to get the relevant information. Can you clarify what the meta field in a HoldingStatus actually is?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a comment, but it's something eliot specifically asked for here: https://docs.google.com/document/d/1N1TRTOMww_4NUNDVbeeWg9raNpSK0Srb16kG4R2qYks/edit?disco=AAABlaa3cpE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 okay fair enough!

@gvaradarajan gvaradarajan requested review from njooma and stuqdog June 17, 2025 15:39
@gvaradarajan gvaradarajan merged commit ba2c70c into viamrobotics:main Jun 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants