Skip to content

#KL25-29 Robotクラスを作る+Motion クラスを作る#8

Merged
molpui0726 merged 9 commits intomainfrom
ticket-KL25-29
May 23, 2025
Merged

#KL25-29 Robotクラスを作る+Motion クラスを作る#8
molpui0726 merged 9 commits intomainfrom
ticket-KL25-29

Conversation

@takuchi17
Copy link
Copy Markdown
Collaborator

チェックリスト

  • clang-format している
  • コーディング規約に準じている
  • チケットの完了条件を満たしている

変更点

  • modules\直下に以下のファイルを追加
    • Robot.h
    • Robot.cpp
  • modules\motions\直下に以下のファイルを追加
    • Motion.h
    • Motion.cpp
  • 今後,公式APIを利用できるようにMakefile.incにインクルードを追加
  • 新しいディレクトリ,motionsを作成したため,Makefile.incCMakeLists.txtに追加

メモ

RobotクラスのメンバにColorSensorインスタンスも持たせようと思ったのですが,
現在モックが無くテストができないため,コメントアウトしています.
ただ,今後必ず公式APIは使うため,インクルードリストには追加しました.

添付資料

Notion

@notion-workspace
Copy link
Copy Markdown

@takuchi17 takuchi17 requested a review from a team May 22, 2025 16:33
Copy link
Copy Markdown
Collaborator

@takahashitom takahashitom left a comment

Choose a reason for hiding this comment

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

とりあえずは、いくつかです。
実際に実機でビルドできるかは試せてないので、すぐ試そうと思います

@takuchi17 takuchi17 self-assigned this May 23, 2025
@takuchi17 takuchi17 requested a review from a team May 23, 2025 06:21
Copy link
Copy Markdown
Contributor

@molpui0726 molpui0726 left a comment

Choose a reason for hiding this comment

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

LGTM‼️
10983

Copy link
Copy Markdown
Collaborator

@takahashitom takahashitom left a comment

Choose a reason for hiding this comment

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

問題なさそうです。
フォースセンサなどの他の機能のAPIは、必要になった時に随時追加していく形で行けば、大丈夫だと思います。

おつかれさまでした。

@molpui0726 molpui0726 requested a review from Copilot May 23, 2025 07:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a Robot class to manage hardware resources, a Motion base class for defining robot behaviors, updates build scripts to include the new modules, and adds basic tests for the robot getters.

  • Added Robot.h/cpp and Motion.h/cpp under modules and modules/motions
  • Updated Makefile.inc and CMakeLists.txt to include the new motions directory
  • Created RobotTest.cpp for validating getter methods and adjusted compose.yaml

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/RobotTest.cpp Added tests for motor and camera getters; commented out ColorSensor tests
modules/motions/Motion.h Defined Motion abstract base class
modules/motions/Motion.cpp Implemented Motion constructor
modules/Robot.h Declared Robot resource manager class
modules/Robot.cpp Implemented Robot constructor and getters
modules/EtRobocon2025.h Added Robot static member and updated author tag
modules/EtRobocon2025.cpp Defined EtRobocon2025::robot and updated author
compose.yaml Removed Docker Compose version declaration
Makefile.inc Included modules/motions and spike API headers
CMakeLists.txt Added motions sources and include directory
Comments suppressed due to low confidence (2)

compose.yaml:1

  • The version field was removed; Docker Compose may require it for compatibility. Please re-add version: '3.8' at the top of the file.
services:

tests/RobotTest.cpp:33

  • ColorSensor tests are currently commented out. Remember to re-enable and implement these tests once ColorSensor support is added to maintain coverage.
// TEST(RobotTest, GetColorSensorInstanceReturnsReference)

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

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

LGTMMM!!!!!!!

Copy link
Copy Markdown
Contributor

@aridome222 aridome222 left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@molpui0726 molpui0726 merged commit 6b1d016 into main May 23, 2025
6 checks passed
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