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

Ball placement obstacle with Stadium Shape on their ball placement #2294

Open
wants to merge 15 commits into
base: ros2
Choose a base branch
from

Conversation

shourikb
Copy link
Contributor

Description

Ensure rules compliance during their ball placement by staying out of the restricted area which is a stadium shape. We create a new geometry shape that represents this stadium shape. The stadium shape is composed of 2 circles and a rectangle. To create the shape, it takes in 2 points (that represent the centers of the circles) and a radius.

Associated / Resolved Issue

https://app.clickup.com/t/86b1vty49

Steps to Test

Test Case 1

  1. Run external ref
  2. Modify robot_factory_position such that update_position always returns SmartIdle
  3. Run ball placement for blue team (yellow team should be Robojackets)
  4. Place the ball somewhere in the field
  5. Move a robot into the stadium shape drawn

Expected result:
Robot will move out of stadium shape drawn

Key Files to Review

Stadium Shape

  • stadium_shape.cpp
  • stadium_shape.hpp

Plan Request

  • plan_request.cpp

Drawer

  • ros_debug_drawer.hpp

Review Checklist

  • Docstrings: All methods and classes should have the file appropriate docstrings which follow the guidelines in the "Contributing" page of our docs.
  • Remove extra print statements: Any print statements used for debugging should be removed
  • Tag reviewers: Tag some people for review and ping them on Slack

(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.

  • Step 1
  • Step 2

…uest. for some reason, we must use the shape set stadium has instead of make stadium a shared pointer to add it to our static obstacles. drawing the stadium shape is also working correctly. the stadium shape will only be added as an obstacle if it is their ball placement.
@@ -48,6 +48,12 @@ void DebugDrawer::draw_circle(rj_geometry::Point center, float radius, const QCo
dbg->set_color(color(qc));
}

// void DebugDrawer::draw_stadium(rj_geometry::StadiumShape& stadium, const QColor& qc, const QString& layer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the comments

@@ -78,6 +79,10 @@ class DebugDrawer {
const QColor& qw = Qt::black,
const QString& layer = QString());

// void draw_stadium(rj_geometry::StadiumShape& stadium,
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

rj_geometry::StadiumShape stadium = rj_geometry::StadiumShape{in.world_state->ball.position, bp_point, ball_obs.radius()};

// for some reason adding the shared pointer below to our static obstacles breaks it, so we add the shape set it has instead.
// std::shared_ptr<rj_geometry::Shape> track_obs_ptr = std::make_shared<rj_geometry::Shape>(stadium);
Copy link
Contributor

Choose a reason for hiding this comment

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

this will be fixed when you add a move constructor

~StadiumShape() = default;

StadiumShape() = default;

Copy link
Contributor

Choose a reason for hiding this comment

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

add a move constructor

sanatd33 and others added 8 commits October 29, 2024 20:18
* initial test of tigers system

* clean up and add comment

* added line test

* fix line issue

* made comments and removed from settle

* Fix Code Style On intermediate-pathgen (#2267)

automated style fixes

Co-authored-by: sanatd33 <[email protected]>

* make pr changes

* add cache inter

* start cacching intermediates

* add params

* use abs angle

* Fix Code Style On intermediate-pathgen (#2269)

automated style fixes

Co-authored-by: sid-parikh <[email protected]>

---------

Co-authored-by: rishiso <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: sanatd33 <[email protected]>
Co-authored-by: petergarud <[email protected]>
Co-authored-by: sid-parikh <[email protected]>
* change to humble

* change dockerfile

* remvoe werror switch

---------

Co-authored-by: petergarud <[email protected]>
* dribbler is stupid

* use realism

* add realism to simoulator cli run

---------

Co-authored-by: petergarud <[email protected]>
change to clang format 12
* start making wall planner

* asdf1234

* complete waller planner

* fix the fix the fix style
automated style fixes

Co-authored-by: shourikb <[email protected]>
@jacksherling jacksherling changed the base branch from ros2 to revert-1970-fix-planner-node October 30, 2024 00:32
@jacksherling jacksherling changed the base branch from revert-1970-fix-planner-node to ros2 October 30, 2024 00:33
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