File tree 2 files changed +14
-1
lines changed
isar/state_machine/states
robot_interface/models/mission 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,10 @@ def _run(self) -> None:
156
156
else :
157
157
if isinstance (status , StepStatus ):
158
158
if self ._step_finished (self .state_machine .current_step ):
159
+ self .state_machine .update_current_task ()
160
+ if self .state_machine .current_task == None :
161
+ transition = self .state_machine .full_mission_finished # type: ignore
162
+ break
159
163
self .state_machine .update_current_step ()
160
164
self .state_machine .current_task .update_task_status ()
161
165
else : # If not all steps are done
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ def is_finished(self) -> bool:
53
53
return True
54
54
55
55
def update_task_status (self ) -> None :
56
+ some_not_started : bool = False
56
57
for step in self .steps :
57
58
if step .status is StepStatus .Failed and isinstance (step , MotionStep ):
58
59
self .error_message = ErrorMessage (
@@ -79,8 +80,16 @@ def update_task_status(self) -> None:
79
80
elif step .status is StepStatus .Successful :
80
81
continue
81
82
83
+ elif (step .status is StepStatus .NotStarted ) and isinstance (
84
+ step , InspectionStep
85
+ ):
86
+ some_not_started = True
87
+
82
88
if self .status is not TaskStatus .PartiallySuccessful :
83
- self .status = TaskStatus .Successful
89
+ if some_not_started :
90
+ self .status = TaskStatus .InProgress # TODO: handle all not_started
91
+ else :
92
+ self .status = TaskStatus .Successful
84
93
85
94
elif self ._all_inspection_steps_failed ():
86
95
self .error_message = ErrorMessage (
You can’t perform that action at this time.
0 commit comments