Conversation
automated style fixes Co-authored-by: eziCode <eziCode@users.noreply.github.com>
|
@eziCode May I ask what prompted the move from using dot products / tan calculations and to using cross products? Based on my quick glance the outcome is the same, so I'm just curious if that was a design choice or if there was a specific bug you were targetting. |
|
I tried what was there, and it didn't seem to work correctly. It kept
shooting into the first position every time, and the loop was not updating
the shot correctly. So I just changed it to use atan and cross product.
…On Wed, Nov 5, 2025 at 12:06 PM Joseph Farkas ***@***.***> wrote:
*FarkasJoseph* left a comment (RoboJackets/robocup-software#2450)
<#2450 (comment)>
@eziCode <https://github.com/eziCode> May I ask what prompted the move
from using dot products / tan calculations and to using cross products?
Based on my quick glance the outcome is the same, so I'm just curious if
that was a design choice or if there was a specific bug you were targetting.
—
Reply to this email directly, view it on GitHub
<#2450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3JAD7MU6UZ72B4ZRWK5KDL33IU73AVCNFSM6AAAAACLFEBAN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOJSGM3TANBXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
looking to add goal post/edge detection into the model. looks like this is missing from offense as well, might add it there if this is a success |
|
i've been told we just don't have the physical feasibility to launch from such tight angles, so it doesn't matter |
|
i'm going to slightly increase our offsets from the goal sides since we are leaving essentially zero tolerance for error |
| } | ||
| } | ||
|
|
||
| constexpr double BALL_WIDTH = 0.025; |
There was a problem hiding this comment.
is this a measured quantity? wondering if there's a constant that already exists for this
| } | ||
|
|
||
| constexpr double BALL_WIDTH = 0.025; | ||
| constexpr double BALL_WIDTH_OFFSET = BALL_WIDTH * 3; |
| double best_distance = -1.0; | ||
| rj_geometry::Point ball_position = this->last_world_state_->ball.position; | ||
|
|
||
| int num_samples = 20; |
There was a problem hiding this comment.
is there a way to do this that doesn't require num_samples? Makes this computation a bit inefficient.
|
Updates: Replaced the sampling method with a simple check to shoot at either the left or right corner of the goal. I expanded the padding on the sides of the goal to 10*ball width, which makes straight shots (or really anything +/- 45deg of a straight shot) work quite well. However, it does exceptionally poorly with tight angles (i.e. corner kicks). Sanat recommends we look at passing logic next (if angle too extreme, pass to a partner instead), but that's likely outside the scope of this specific PR. |
automated style fixes Co-authored-by: FarkasJoseph <FarkasJoseph@users.noreply.github.com>


Description
Updated free kick logic to shoot at position farthest from the goalie
Steps to Test
Test Case 1
Key Files to Review
Group 1