-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
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).