Skip to content

Commit

Permalink
Fix robotinterface customizability
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonsf committed May 13, 2024
1 parent c986a0b commit 7799592
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/isar_robot/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ def mission_status(self) -> MissionStatus:
self.current_mission = None
if settings.SHOULD_FAIL_LOCALIZATION_MISSION:
return MissionStatus.Failed
return MissionStatus.Successful

if is_return_to_home_mission(self.current_mission):
self.current_step = None
if settings.SHOULD_FAIL_RETURN_TO_HOME_MISSION:
return StepStatus.Failed
return MissionStatus.Failed
return MissionStatus.Successful

self.current_mission = None
if settings.SHOULD_FAIL_NORMAL_MISSION:
return MissionStatus.Failed

return MissionStatus.Successful

def initiate_step(self, step: Step) -> None:
Expand All @@ -68,16 +69,17 @@ def step_status(self) -> StepStatus:
self.current_step = None
if settings.SHOULD_FAIL_LOCALIZATION_STEP:
return StepStatus.Failed
return StepStatus.Successful

if is_return_to_home_step(self.current_step):
self.current_step = None
if settings.SHOULD_FAIL_RETURN_TO_HOME_STEP:
return StepStatus.Failed
return StepStatus.Successful

self.current_step = None
if settings.SHOULD_FAIL_NORMAL_STEP:
return StepStatus.Failed

return StepStatus.Successful

def stop(self) -> None:
Expand Down

0 comments on commit 7799592

Please sign in to comment.