-
Notifications
You must be signed in to change notification settings - Fork 186
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
Adding Seeking #2160
Adding Seeking #2160
Conversation
automated style fixes Co-authored-by: sanatd33 <[email protected]>
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.
Hey this looks generally good but can we refactor seeking into a RoleInterface
? As much as I dislike RoleInterface
this is a lot of code to put straight into this file. Could also use a little more commenting maybe some docs-style stuff explaining what each function does.
automated style fixes Co-authored-by: sanatd33 <[email protected]>
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.
note all the GH action warnings. I left more constructive comments that should resolve all them, but double-check before your next submission. you can ignore the cognitive complexity one for now
* The Seeking role provides the implementation for a offensive robot that | ||
* is trying to get open, so that they can receive a pass | ||
*/ | ||
class Seeking : public RoleInterface { |
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.
call this Seeker
* is trying to get open, so that they can receive a pass | ||
*/ | ||
class Seeking : public RoleInterface { | ||
public: |
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.
see the GH action warning: explicitly =default
the other four required ctors/operators see "rule of five" section here https://en.cppreference.com/w/cpp/language/rule_of_three or ask me for more info
// The seeker's id | ||
int robot_id_; | ||
// The taret point to move to | ||
rj_geometry::Point target_pt{0.0, 0.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.
target_pt_
*/ | ||
rj_geometry::Point get_open_point(const WorldState* world_state, | ||
rj_geometry::Point current_position, | ||
FieldDimensions field_dimensions); |
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.
FieldDimensions field_dimensions); | |
FieldDimensions field_dimensions) const; |
*/ | ||
rj_geometry::Point get_open_point(const WorldState* world_state, | ||
rj_geometry::Point current_position, | ||
FieldDimensions field_dimensions); |
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.
FieldDimensions field_dimensions); | |
const FieldDimensions& field_dimensions); |
* | ||
* @return rj_geometry::Point The best point found | ||
*/ | ||
rj_geometry::Point calculate_open_point(double current_prec, double min_prec, |
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.
same changes as before
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.
also for both of these member fns make them static
if they don't use any members
* | ||
* @return rj_geometry::Point The corrected point | ||
*/ | ||
rj_geometry::Point correct_point(rj_geometry::Point point, FieldDimensions field_dimensions); |
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.
same as last two
* | ||
* @return double The evaluation of that target point | ||
*/ | ||
double eval_point(rj_geometry::Point ball_pos, rj_geometry::Point current_point, |
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.
same
automated style fixes Co-authored-by: sanatd33 <[email protected]>
Added hard-coded robot positions in main_window reset method
* added play state to plan request * Fix style * Fix Code Style On add-play-state-to-plan-request (#2166) automated style fixes Co-authored-by: sid-parikh <[email protected]> --------- Co-authored-by: Sid Parikh <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sid-parikh <[email protected]>
41df6ad
to
26c7f7b
Compare
automated style fixes Co-authored-by: sanatd33 <[email protected]>
hey @sanatd33 you re-requested my review but didn't address many of the comments from the previous review. please take a look at those when you get a chance. |
automated style fixes Co-authored-by: sanatd33 <[email protected]>
Description
Adds seeking functionality to offense which makes idle robots try to 'get open'.
Associated / Resolved Issue
Resolves https://app.clickup.com/t/86aytmv75
Steps to Test
Expected result: Idle robots should be moving around the field to get open
Key Files to Review
Review Checklist
(Optional) Sub-issues (for drafts)
Note: if you find yourself breaking this PR into many smaller features, it may make sense to break up the PR into logical units based on these features.