Skip to content
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

feat(gripper): add stay engaged param to grip message #711

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

ahiuchingau
Copy link
Contributor

We want to be able to differentiate between an actual labware grip and a grip that closes the jaw to minimize the footprint of the gripper during gantry movement (we call this the idle position from the api).

This will inform the firmware whether or not the jaw motor needs to stay engaged when we receive a stop request and prevent unexpected dropping of labware. And if the gripper was in the idle position, the jaw can simply disengage since it does not matter because it is not gripping anything.

The next step is to get gripper to report the real-time jaw state to the hardware controller API (so we don't have to rely soely on the gripper handler instance variable to keep track of the jaw state, which gets lost when the robot server stops).

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Accidental inclusion of gripper position in the request?


template <bit_utils::ByteIterator Input, typename Limit>
static auto parse(Input body, Limit limit) -> GripperGripRequest {
uint8_t group_id = 0;
uint8_t seq_id = 0;
brushed_timer_ticks duration = 0;
uint32_t duty_cycle = 0;
int32_t encoder_position_um = 0;
Copy link
Member

Choose a reason for hiding this comment

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

why are we adding this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's always part of the payload of the generic gripper move messages, but we never defined it because it is always 0 for the gripper grip request

@@ -1005,26 +1005,34 @@ struct GripperGripRequest : BaseMessage<MessageId::gripper_grip_request> {
uint8_t seq_id;
brushed_timer_ticks duration;
uint32_t duty_cycle;
int32_t encoder_position_um;
Copy link
Member

Choose a reason for hiding this comment

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

why are we adding this in the request from host?

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Okay, the position thing makes sense now.

@ahiuchingau ahiuchingau merged commit 9718788 into main Aug 2, 2023
38 of 40 checks passed
@ahiuchingau ahiuchingau deleted the gripper_use-stay-engaged-arg branch August 2, 2023 20:39
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.

2 participants