Skip to content

Conversation

@agich073
Copy link
Contributor

@agich073 agich073 commented Aug 8, 2025

概要

  • 相手ロボットの閾値分の台数以上が自陣に侵入してきたらPlayを切り替えるように変更しました。
  • 閾値は仮に5と置いています。

関連チケット

変更内容

  • 変更: consai_game/play/books/playbook_default.py
  • 変更: consai_game/play/factory/running_plays.py
  • 変更: consai_game/world_model/robot_activity_model.py
  • 追加: consai_game/play/conditions/robot_conditions.py

動作確認内容

  • ビルドが通ること
  • 手動での動作確認(該当箇所の実行結果など)

確認したReferee Command

  • HALT
  • STOP
  • FORCE_START
  • OUR_FREEKICK
  • THEIR_FREEKICK
  • OUR KICKOFF
  • THEIR KICKOFF
  • OUR_PENALTY
  • THEIR_PENALTY
  • OUR_TIMEOUT
  • THEIR_TIMEOUT

補足

  • 一旦これでプルリクを出しますが、仮です。

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_force_start.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717952722

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_free_kick.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717954007

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_obstacle_avoidance.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717954140

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

yellow_invert/test_scenario_yellow_invert_kickoff.py failed. Failure logs:

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_kickoff.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717955994

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_penalty.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717959956

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_ball_placement.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717963721

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_ball_placement2.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717964073

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_force_start.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717985328

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_obstacle_avoidance.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717985944

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_free_kick.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717986715

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

yellow_invert/test_scenario_yellow_invert_kickoff.py failed. Failure logs:

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_kickoff.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717988932

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_penalty.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717991585

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_ball_placement2.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717995554

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

test_scenario_ball_placement.py failed. Failure logs: https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/artifacts/3717996106

@ShotaAk
Copy link
Contributor

ShotaAk commented Aug 9, 2025

@agich073
実行時エラーでCIがコケてるので直してほしいです〜

https://github.com/SSL-Roots/consai_ros2/actions/runs/16825847494/job/47662427145#step:11:74

consai  | [main.py-4] Traceback (most recent call last):
consai  | [main.py-4]   File "/root/ros2_ws/install/consai_game/lib/consai_game/main.py", line 62, in <module>
consai  | [main.py-4]     play_node = PlayNode(update_hz=UPDATE_HZ, book_name=args.playbook)
consai  | [main.py-4]   File "/root/ros2_ws/install/consai_game/local/lib/python3.10/dist-packages/consai_game/core/play/play_node.py", line 56, in __init__
consai  | [main.py-4]     self.playbook = self.load_playbook(book_name)
consai  | [main.py-4]   File "/root/ros2_ws/install/consai_game/local/lib/python3.10/dist-packages/consai_game/core/play/play_node.py", line 96, in load_playbook
consai  | [main.py-4]     spec.loader.exec_module(module)
consai  | [main.py-4]   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
consai  | [main.py-4]   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
consai  | [main.py-4]   File "/root/ros2_ws/src/consai_ros2/consai_game/consai_game/play/books/playbook_default.py", line 27, in <module>
consai  | [main.py-4]     running_plays.outside_defense_area_1(),
consai  | [main.py-4] AttributeError: module 'consai_game.play.factory.running_plays' has no attribute 'outside_defense_area_1'. Did you mean: 'outside_defense_area_their_in'?

Copy link
Contributor

@ShotaAk ShotaAk left a comment

Choose a reason for hiding this comment

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

動作OKです!
気になるところコメントしました〜



class RobotConditions:
"""ロボットに関連する条件をまとめたクラス."""
Copy link
Contributor

Choose a reason for hiding this comment

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

ここのコメント修正お願いします〜

"""

def condition(world_model: WorldModel) -> bool:
"""ボールの速度が閾値より小さいかを判定する条件関数."""
Copy link
Contributor

Choose a reason for hiding this comment

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

ここのコメントも修正お願いします〜

"""ロボットに関連する条件をまとめたクラス."""

@staticmethod
def their_robots_in_our_area() -> PlayCondition:
Copy link
Contributor

Choose a reason for hiding this comment

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

判定条件もわかるような名前にしたいです。
例えば half をいれるとよいかな

Suggested change
def their_robots_in_our_area() -> PlayCondition:
def are_half_of_their_robots_in_our_area() -> PlayCondition:

Copy link
Contributor

@ShotaAk ShotaAk left a comment

Choose a reason for hiding this comment

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

LGTMです

@ShotaAk ShotaAk merged commit 95b39cc into main Aug 11, 2025
13 checks passed
@ShotaAk ShotaAk deleted the invasion_switch branch August 11, 2025 08:22
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.

3 participants