-
Notifications
You must be signed in to change notification settings - Fork 189
Marking coordinator #2446
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
Open
petergarud
wants to merge
45
commits into
ros2
Choose a base branch
from
marking-coordinator
base: ros2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Marking coordinator #2446
Changes from 38 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8b1aa38
first steps
shourikb ef5bc01
added required messages for marking
shourikb 74e7956
more setup
shourikb a5487ae
fixed some stuff
shourikb dfe621e
added a dangerous score array to keep track of valid targets
shourikb 01e4436
made some progress
shourikb 6301a5b
danger score calcs
Squid5678 c85f542
more marking stuff
Squid5678 e83d402
update naming
Squid5678 b501fe6
can leave marking
Squid5678 ded69ac
fixed linker error
Squid5678 20b41d0
started client
Squid5678 787f99b
marking client should be done
Squid5678 32f8860
started on danger score calculation
petergarud 64ef7d4
marking coordaintor should be done'
petergarud 15f1b61
Struct of coordinators: compiles but fails to run at all
petergarud 267f9bd
Fix issue with not running
petergarud 30e54f6
starting implementing coordaintor with defense
petergarud 86e538a
added some more stuff to implement marking into the defense state mac…
shourikb c740b5e
some debugging done. marks now, but sim crashes
shourikb 68ce933
stuff
petergarud 245cfd4
fixed it so it compiles
shourikb 1d6c90d
Stuff
petergarud a6c207a
rebase to ros2 to have colcon
sanatd33 b653fd7
stuff
petergarud 5477bf5
New danger score parameters
petergarud e2b8c4e
Merge from ros2
petergarud f070f8a
Danger angle change
petergarud 2f1354a
doesn't mark the guy with the ball anymore
shourikb ac18cc7
completed marking coordinator
shourikb a53480b
cleaned up a little
shourikb 3914d60
Fix Code Style On marking-coordinator (#2447)
github-actions[bot] 3073ef6
Resolve merge comments
petergarud 9207a0c
Resolve comments
petergarud d916b5a
Fix Code Style On marking-coordinator (#2452)
github-actions[bot] 8de5768
fix client handles
sanatd33 0ce1e25
Fix Code Style On marking-coordinator (#2454)
github-actions[bot] e79fb8e
addressed most comments but still missing some callback stuff (check …
shourikb 1fc4831
Fix Code Style On marking-coordinator (#2457)
github-actions[bot] 22d0b1b
fixed some more comments
shourikb 88daaec
Merge branch 'marking-coordinator' of https://github.com/RoboJackets/…
shourikb 7b1c468
More fixes
shourikb 498f016
addressed all comments
shourikb dd5a402
Add client handles implementation
petergarud 5e2cc4d
Fix Code Style On marking-coordinator (#2472)
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # This is a message to pick a robot to mark | ||
| uint8[16] mark_robot_ids # ID of the robot to mark on the opposing team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Request a robot to be added to or removed from the marking group | ||
| uint8 robot_id # ID of the robot (0 to kNumShells-1) | ||
| bool join | ||
| --- | ||
| bool success # Always true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,9 +16,7 @@ | |
| #include <rj_msgs/action/robot_move.hpp> | ||
|
|
||
| #include "rj_strategy/agent/position.hpp" | ||
| #include "rj_strategy/agent/position/marker.hpp" | ||
| #include "rj_strategy/agent/position/waller.hpp" | ||
|
|
||
| namespace strategy { | ||
|
|
||
| /* | ||
|
|
@@ -29,7 +27,7 @@ class Defense : public Position { | |
| public: | ||
| Defense(int r_id); | ||
| ~Defense() override = default; | ||
| Defense(const Position& other); | ||
| Defense(Position&& other); | ||
|
|
||
| void receive_communication_response(communication::AgentPosResponseWrapper response) override; | ||
| communication::PosAgentResponseWrapper receive_communication_request( | ||
|
|
@@ -44,9 +42,8 @@ class Defense : public Position { | |
| void revive() override; | ||
|
|
||
| private: | ||
| // static constexpr int kMaxWallers{6}; | ||
| static constexpr int kMaxWallers{ | ||
| static_cast<int>(kNumShells)}; // This effectively turns off marking | ||
| static constexpr int kMaxWallers{2}; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this be changed into a constant |
||
| static constexpr RJ::Seconds kMarkingGroupJoinTimeout{2.0}; | ||
|
|
||
| /** | ||
| * @brief The derived_get_task method returns the task for the defensive robot | ||
|
|
@@ -120,8 +117,11 @@ class Defense : public Position { | |
| int get_waller_id(); | ||
| State current_state_ = JOINING_WALL; | ||
|
|
||
| int get_marker_target_id(); | ||
| Marker marker_; | ||
| bool sent_join_marking_group_request_ = false; | ||
| RJ::Time request_time_; | ||
|
|
||
|
|
||
| bool pending_marking_state_ = false; | ||
| }; | ||
|
|
||
| } // namespace strategy | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
src/rj_strategy/include/rj_strategy/agent/position/marker.hpp
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can you remove these changes from the commit (same for
install/setup.zsh)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.
I don't think anything got changed here. Looks like just removed then added the line back.