Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge obstacle status into robot status #1047

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

UsamaEquinorAFK
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

🔔 Changes in database folder detected 🔔
Do these changes require adding new migrations? 🤔 In that case follow these steps.
If you are uncertain, ask a database admin on the team 😄

@@ -25,6 +25,10 @@ export function RobotStatusChip({ status }: StatusProps) {
chipColor = StatusColors.Busy
break
}
case RobotStatus.Stuck: {
chipColor = StatusColors.Busy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a dedicated statuscolor for Stuck. This color can be the same as the one for busy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marriane has used same one in figma

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
chipColor = StatusColors.Busy
chipColor = StatusColors.Stuck

Agree with Øystein. Make this change and then add a StatusColors.Stuck that has the same value as busy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

oysand
oysand previously requested changes Oct 9, 2023
Copy link
Contributor

@oysand oysand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@UsamaEquinorAFK UsamaEquinorAFK marked this pull request as ready for review October 24, 2023 13:31
@UsamaEquinorAFK UsamaEquinorAFK force-pushed the rs branch 2 times, most recently from d806bd0 to 8e37bce Compare October 24, 2023 13:50
@@ -353,6 +352,16 @@ public async Task<ActionResult<IList<VideoStream>>> GetVideoStreams([FromRoute]
return NotFound("Robot not found");
}

if (robot.Status is RobotStatus.Stuck)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest renaming stuck to blocked

Comment on lines 355 to 363
if (robot.Status is RobotStatus.Stuck)
{
_logger.LogWarning(
"Robot '{id}' is stuck ({status})",
robotId,
robot.Status.ToString()
);
return Conflict($"The Robot is stuck ({robot.Status})");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest removing. Want to keep the option to try a new mission, different mission, if the current one is blocked

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@@ -229,7 +229,6 @@ public async Task<ActionResult<Robot>> DeleteRobot([FromRoute] string id)
)
{
_logger.LogInformation("Updating robot status with id={id}", id);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove?

Comment on lines 684 to 692
if (robot.Status is RobotStatus.Stuck)
{
_logger.LogWarning(
"Robot '{id}' is stuck ({status})",
scheduleLocalizationMissionQuery.RobotId,
robot.Status.ToString()
);
return Conflict($"The Robot is stuck ({robot.Status})");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this is desired behavior. Should be able to localize even if the robot has some obstacle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - will be removed

@UsamaEquinorAFK UsamaEquinorAFK force-pushed the rs branch 2 times, most recently from 912fcb1 to 813f138 Compare October 26, 2023 11:52
Copy link
Contributor

@andchiind andchiind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Small and tidy PR

@UsamaEquinorAFK
Copy link
Contributor Author

@oysand review this again please :)

@UsamaEquinorAFK UsamaEquinorAFK dismissed oysand’s stale review October 31, 2023 12:52

Approved by another guy and updated according to your request :)

@UsamaEquinorAFK UsamaEquinorAFK merged commit daf28cd into equinor:main Oct 31, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants