Skip to content

Commit

Permalink
Merge pull request #6 from robocup-logistics/twendt/error
Browse files Browse the repository at this point in the history
Added Error Codes to AgentTask
  • Loading branch information
TarikViehmann authored Nov 19, 2024
2 parents e78fb08 + ac03d17 commit 29d5993
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 28 additions & 3 deletions AgentTask.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ message AgentTask {
MSG_TYPE = 502;
}

// 0: None
// 1XX: Parsing Error
// 2XX: Execution Error
// 22X: Internal Error
// 3XX: Calculation Error
enum ErrorCode {
NO_ERROR = 0;
UNKNOWN = 1;
WRONG_TEAM = 101;
WRONG_ROBOT = 102;
INVALID_TARGET = 103;
TASK_NOT_SUPPORTED = 104;
NOT_AT_POSITION = 105;
UNABLE_TO_MOVE_TO_TARGET = 201;
NO_WORKPIECE_FOUND = 202;
MPS_NOT_FOUND = 203;
WORKPIECE_SENSOR_DISAGREEMENT = 204;
ABORTED_DUE_TO_UNEXPECTED_COLLISION = 205;
GRASPING_FAILED = 206;
WORKPIECE_ALREADY_IN_GRIPPER = 207;
NO_WORKPIECE_IN_GRIPPER = 208;
MACHINE_POINT_OCCUPIED = 209;
INTERNAL_ERROR = 220;
NO_PATH_FOUND = 300;
}

// general infos
required Team team_color = 1; // Color of the team
required uint32 task_id = 2; // identifier for the tasks
Expand All @@ -36,9 +62,8 @@ message AgentTask {
12; // if true current task is paused, if false again task is continued
optional bool successful = 13; // was the task finished successful?
optional bool canceled =
14; // the task was successfully cancled from the agent
optional uint32 error_code = 15; // only set if failure, error-codes not yet
// defined, might be changed to an enum
14; // the task was successfully canceled from the agent
optional uint32 error_code = 15; // only set if failure, error codes defined in ErrorCode enum
}

// Move robot to stated waypoint
Expand Down
6 changes: 6 additions & 0 deletions Zone.proto
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ enum Zone {
C_Z21 = 21;
C_Z31 = 31;
C_Z41 = 41;
C_Z51 = 51;
C_Z61 = 61;
C_Z71 = 71;

M_Z18 = 1018;
M_Z28 = 1028;
Expand Down Expand Up @@ -165,4 +168,7 @@ enum Zone {
M_Z21 = 1021;
M_Z31 = 1031;
M_Z41 = 1041;
M_Z51 = 1051;
M_Z61 = 1061;
M_Z71 = 1071;
}

0 comments on commit 29d5993

Please sign in to comment.