Skip to content

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

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 <sanatd33@users.noreply.github.com>

* 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 <sid-parikh@users.noreply.github.com>

---------

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

* change dockerfile

* remvoe werror switch

---------

Co-authored-by: petergarud <peter.garud04@gmail.com>
* dribbler is stupid

* use realism

* add realism to simoulator cli run

---------

Co-authored-by: petergarud <peter.garud04@gmail.com>
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 <shourikb@users.noreply.github.com>
@shourikb shourikb requested a review from sanatd33 October 30, 2024 00:20
@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
@jacksherling jacksherling merged commit 3cee3a0 into ros2 Dec 16, 2024
2 checks passed
@jacksherling jacksherling deleted the ball-placement-obstacle branch December 16, 2024 05:58
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