Skip to content

Conversation

timtmit
Copy link
Contributor

@timtmit timtmit commented Aug 4, 2025

This pull request introduces enhancements to the OnRobotGripper class to improve the detection of gripper movement completion, including handling scenarios where the gripper stalls

Enhancements to movement detection:

  • Added new variables for movement tracking: Introduced _last_known_position and _last_position_change_time to track the gripper's position and the last time it changed significantly (onrobot_gripper.hpp).
  • Updated movement initialization: Reset _last_known_position and _last_position_change_time when a new command is issued to ensure accurate tracking (onrobot_gripper.cpp).

Improvements to gripper movement logic:

  • Refined movement completion conditions: Enhanced the logic to determine when the gripper has finished moving, including:
    • Checking if the target position is reached within a tolerance of 2%.
    • Detecting if the gripper has stalled by monitoring position changes and timing out after 5 seconds of inactivity (onrobot_gripper.cpp).
  • Reset command state appropriately: Ensured the _command_in_progress flag is reset only when movement is confirmed as finished, either by reaching the target position or due to stalling (onrobot_gripper.cpp).

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.

1 participant