diff --git a/src/reachy2_sdk/head.py b/src/reachy2_sdk/head.py index 7d2ddc94..1011a304 100644 --- a/src/reachy2_sdk/head.py +++ b/src/reachy2_sdk/head.py @@ -12,6 +12,7 @@ from pyquaternion import Quaternion as pyQuat from reachy2_sdk_api.goto_pb2 import ( CartesianGoal, + GoToAck, GoToId, GoToInterpolation, GoToRequest, @@ -229,6 +230,10 @@ def rotate_to( response = self._goto_stub.GoToJoints(request) return response + def cancel_goto_by_id(self, goto_id: int) -> GoToAck: + response = self._goto_stub.CancelGoTo(goto_id) + return response + def orient(self, q: pyQuat, duration: float = 2.0, interpolation_mode: str = "minimum_jerk") -> GoToId: """Send neck to the orientation given as a quaternion.""" request = GoToRequest(