Skip to content

Commit

Permalink
Add exception for invalid robot joints
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed May 15, 2024
1 parent a7024c9 commit 5bc879e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/robot_interface/models/exceptions/robot_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ErrorReason(str, Enum):
RobotUnknownErrorException: str = "robot_unknown_error_exception"
RobotDisconnectedException: str = "robot_disconnected_exception"
RobotMissionNotSupportedException: str = "robot_mission_not_supported_exception"
RobotInvalidJointsException: str = "robot_invalid_joints_exception"


@dataclass
Expand Down Expand Up @@ -244,3 +245,13 @@ def __init__(self, error_description: str) -> None:
)

pass

# An exception which should be thrown by the robot package if the robot is given an invalid list of joints for its arm pose
class RobotInvalidJointsException(RobotException):
def __init__(self, error_description: str) -> None:
super().__init__(
error_reason=ErrorReason.RobotInvalidJointsException,
error_description=error_description,
)

pass

0 comments on commit 5bc879e

Please sign in to comment.