Skip to content

Commit d4e5eb9

Browse files
[N/A] Fix bug with gripper status check (#118)
1 parent 667ecca commit d4e5eb9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

spot_driver/spot_driver/spot_ros2.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,9 +1523,17 @@ def _robot_command_goal_complete(self, feedback: RobotCommandFeedback) -> GoalRe
15231523
if grip_feedback.command.command_choice == grip_feedback.command.COMMAND_CLAW_GRIPPER_FEEDBACK_SET:
15241524
if (
15251525
grip_feedback.command.claw_gripper_feedback.status.value
1526-
!= grip_feedback.command.claw_gripper_feedback.status.STATUS_AT_GOAL
1526+
== grip_feedback.command.claw_gripper_feedback.status.STATUS_IN_PROGRESS
15271527
):
15281528
return GoalResponse.IN_PROGRESS
1529+
elif (
1530+
grip_feedback.command.claw_gripper_feedback.status.value
1531+
== grip_feedback.command.claw_gripper_feedback.status.STATUS_UNKNOWN
1532+
):
1533+
self.get_logger().error("ERROR: claw grippper status unknown")
1534+
return GoalResponse.IN_PROGRESS
1535+
# else: STATUS_AT_GOAL or STATUS_APPLYING_FORCE
1536+
15291537
else:
15301538
self.get_logger().error("ERROR: unknown gripper command type")
15311539
return GoalResponse.IN_PROGRESS

0 commit comments

Comments
 (0)