-
Notifications
You must be signed in to change notification settings - Fork 37
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
Introduce inspection area polygon #2028
base: main
Are you sure you want to change the base?
Conversation
🔔 Migrations changes detected 🔔 |
b212863
to
2d6d405
Compare
Remaining work could be to remove Plant of Installation, documented here: |
f5c9456
to
08aa643
Compare
{ ""x"": 0, ""y"": 0 }, | ||
{ ""x"": 0, ""y"": 10 }, | ||
{ ""x"": 10, ""y"": 10 }, | ||
{ ""x"": 10, ""y"": 0 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, we are just checking for a square polygon. Maybe sufficient for now, but an idea here could be to define a more complex polygon and use property-based testing to test it. Issue for another time probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, though that was good enough for the test without having to think to much
return Conflict( | ||
$"The tasks of the mission are not inside the inspection area of the robot" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is conflict correct error type or is bad request more descriptive? Conflict indicates that the request didn't success at the moment due to some conflict with the current state, but this request will never succeed with the given input.
|
||
if (inspectionAreaPolygon == null) | ||
{ | ||
return true; // Invalid polygon, so all tasks are inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this trigger a warning before returning?
Ready for review checklist: