Split goal scene conditions for left and right goals with team color detection - #92
Draft
tomoakiwakawaka with Copilot wants to merge 5 commits into
Draft
Split goal scene conditions for left and right goals with team color detection#92tomoakiwakawaka with Copilot wants to merge 5 commits into
tomoakiwakawaka with Copilot wants to merge 5 commits into
Conversation
Author
|
@tomoakiwakawaka 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
…ght goals Co-authored-by: tomoakiwakawaka <131442068+tomoakiwakawaka@users.noreply.github.com>
Co-authored-by: tomoakiwakawaka <131442068+tomoakiwakawaka@users.noreply.github.com>
…gration Co-authored-by: tomoakiwakawaka <131442068+tomoakiwakawaka@users.noreply.github.com>
Co-authored-by: tomoakiwakawaka <131442068+tomoakiwakawaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] goal.pyの条件の分割
Split goal scene conditions for left and right goals with team color detection
Sep 20, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses the need to separate goal detection logic that was previously combined for both left and right goals. The original implementation used a single condition that handled both goals simultaneously, making it difficult to distinguish between different goal scenarios and team contexts.
Key Changes
1. Split Goal Detection Logic
((ball_x > poji_goal_x and ...) or (ball_x < nega_goal_x and ...))if/elifblocks for right goal (x > 6000) and left goal (x < -6000)2. Team Color Detection
Added
determine_attacking_team()function that:3. Enhanced Data Storage
robot_position_goal.csvrobot_position_left_goal.csvandrobot_position_right_goal.csvattacking_team,goal_side,ball_angle,ball_speed,ball_x,ball_y4. Ball Trajectory Analysis
Implemented
calculate_ball_angle()function that:math.atan2(vy, vx)5. Integration Fixes
goal_scene()function signature to match existing architecturemain.pywith proper argument passingExample Usage
The system now generates separate CSV files for each goal with enhanced data:
This makes it much easier to analyze:
Fixes #86.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.