Skip to content

Commit

Permalink
Raise error if joints goals list for goto_joints does not have the ri…
Browse files Browse the repository at this point in the history
…ght size.
  • Loading branch information
simheo committed Dec 19, 2023
1 parent 24eedff commit 6774545
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/reachy2_sdk/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ def goto_joints(
Given a list of joint positions (exactly 7 joint positions),
it will move the arm to that position.
"""
if len(positions) != 7:
raise ValueError(f"positions should be length 7 (got {len(positions)} instead)!")

arm_pos = self._list_to_arm_position(positions, degrees)
request = GoToRequest(
joints_goal=JointsGoal(
Expand Down

0 comments on commit 6774545

Please sign in to comment.