diff --git a/backend/api/Controllers/Models/MissionRunQueryStringParameters.cs b/backend/api/Controllers/Models/MissionRunQueryStringParameters.cs index 507b1852..88a1b90f 100644 --- a/backend/api/Controllers/Models/MissionRunQueryStringParameters.cs +++ b/backend/api/Controllers/Models/MissionRunQueryStringParameters.cs @@ -66,7 +66,7 @@ public MissionRunQueryStringParameters() public MissionRunType? MissionRunType { get; set; } /// - /// Filter for whether the result should exclude return to home missions. The default is false + /// Filter for whether the result should exclude return home missions. The default is false /// public bool ExcludeReturnToHome { get; set; } diff --git a/backend/api/Controllers/ReturnToHomeController.cs b/backend/api/Controllers/ReturnToHomeController.cs index 5a15deb2..c2ae9472 100644 --- a/backend/api/Controllers/ReturnToHomeController.cs +++ b/backend/api/Controllers/ReturnToHomeController.cs @@ -41,7 +41,7 @@ await returnToHomeService.ScheduleReturnToHomeMissionRunIfNotAlreadyScheduledOrR ); if (returnToHomeMission is null) { - string errorMessage = "Error while scheduling Return to Home mission"; + string errorMessage = "Error while scheduling Return home mission"; logger.LogError(errorMessage); return StatusCode(StatusCodes.Status502BadGateway, $"{errorMessage}"); } diff --git a/backend/api/Database/Models/MissionRun.cs b/backend/api/Database/Models/MissionRun.cs index a56e2052..31284251 100644 --- a/backend/api/Database/Models/MissionRun.cs +++ b/backend/api/Database/Models/MissionRun.cs @@ -14,7 +14,7 @@ public class MissionRun : SortableRecord [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public string Id { get; set; } - //[Required] // See "Drive to Docking Station" mission in RobotController.cs + //[Required] // Return home missions do not have a corresponding MissionDefinition public string? MissionId { get; set; } [Required] diff --git a/backend/api/Database/Models/MissionTask.cs b/backend/api/Database/Models/MissionTask.cs index 8c6c69ca..448b188c 100644 --- a/backend/api/Database/Models/MissionTask.cs +++ b/backend/api/Database/Models/MissionTask.cs @@ -68,7 +68,7 @@ public MissionTask(Pose robotPose, MissionTaskType type) { case MissionTaskType.ReturnHome: Type = type; - Description = "Return to home"; + Description = "Return home"; RobotPose = robotPose; TaskOrder = 0; Status = TaskStatus.NotStarted; diff --git a/backend/api/Services/MissionSchedulingService.cs b/backend/api/Services/MissionSchedulingService.cs index 925a612f..ccbabfa3 100644 --- a/backend/api/Services/MissionSchedulingService.cs +++ b/backend/api/Services/MissionSchedulingService.cs @@ -96,11 +96,11 @@ await returnToHomeService.ScheduleReturnToHomeMissionRunIfNotAlreadyScheduledOrR { signalRService.ReportGeneralFailToSignalR( robot, - $"Failed to schedule return to home for robot {robot.Name}", + $"Failed to schedule return home for robot {robot.Name}", "" ); logger.LogError( - "Failed to schedule a return to home mission for robot {RobotId}", + "Failed to schedule a return home mission for robot {RobotId}", robot.Id ); } @@ -173,7 +173,7 @@ await returnToHomeService.ScheduleReturnToHomeMissionRunIfNotAlreadyScheduledOrR catch (ReturnToHomeMissionFailedToScheduleException) { logger.LogError( - "Failed to schedule a return to home mission for robot {RobotId}", + "Failed to schedule a return home mission for robot {RobotId}", robot.Id ); } @@ -269,7 +269,7 @@ await returnToHomeService.ScheduleReturnToHomeMissionRunIfNotAlreadyScheduledOrR catch (ReturnToHomeMissionFailedToScheduleException) { logger.LogError( - "Failed to schedule a return to home mission for robot {RobotId}", + "Failed to schedule a return home mission for robot {RobotId}", robot.Id ); return null; @@ -435,7 +435,7 @@ public async Task ScheduleMissionToDriveToDockPosition(string robotId) var missionRun = new MissionRun { - Name = "Drive to Docking Station", + Name = "Return home", Robot = robot, MissionRunType = MissionRunType.Emergency, InstallationCode = robot.CurrentInstallation.InstallationCode, @@ -501,9 +501,7 @@ IEnumerable interruptedMissionRunIds if (missionRun.IsReturnHomeMission()) { - logger.LogWarning( - "Return to home mission will not be added back to the queue." - ); + logger.LogWarning("Return home mission will not be added back to the queue."); return; } @@ -671,7 +669,7 @@ public async Task AbortActiveReturnToHomeMission(string robotId) if (activeReturnToHomeMission == null) { logger.LogWarning( - "Attempted to abort active Return to Home mission for robot with Id {RobotId} but none was found", + "Attempted to abort active Return home mission for robot with Id {RobotId} but none was found", robotId ); return; diff --git a/backend/api/Services/ReturnToHomeService.cs b/backend/api/Services/ReturnToHomeService.cs index 61ee71fe..1b8707ee 100644 --- a/backend/api/Services/ReturnToHomeService.cs +++ b/backend/api/Services/ReturnToHomeService.cs @@ -25,7 +25,7 @@ string robotId ) { logger.LogInformation( - "Scheduling return to home mission if not already scheduled or the robot is home for robot {RobotId}", + "Scheduling return home mission if not already scheduled or the robot is home for robot {RobotId}", robotId ); var lastMissionRun = await missionRunService.ReadLastExecutedMissionRunByRobot(robotId); @@ -60,7 +60,6 @@ or UnsupportedRobotCapabilityException or MissionRunNotFoundException ) { - // TODO: if we make ISAR aware of return to home missions, we can avoid scheduling them when the robot does not need them throw new ReturnToHomeMissionFailedToScheduleException(ex.Message); } @@ -118,7 +117,7 @@ robot.RobotCapabilities is not null var returnToHomeMissionRun = new MissionRun { - Name = "Return to home mission", + Name = "Return home", Robot = robot, InstallationCode = robot.CurrentInstallation.InstallationCode, MissionRunType = MissionRunType.ReturnHome, @@ -163,7 +162,7 @@ robot.RobotCapabilities is not null if (activeReturnToHomeMissions.Count > 1) { logger.LogError( - $"Two Return to Home missions should not be queued or ongoing simoultaneously for robot with Id {robotId}." + $"Two Return home missions should not be queued or ongoing simoultaneously for robot with Id {robotId}." ); }