Closed yoshikai-qt closed 3 months ago
この変更は、ros2/kachaka_grpc_ros2_bridge
パッケージのrobot_info_component.cpp
ファイルにバッテリーステート情報を扱う機能を追加します。具体的には、sensor_msgs::msg::BatteryState
メッセージとkachaka_api::GetBatteryInfoResponse
データの間のブリッジを設定し、非同期操作の開始と停止を管理する機能が含まれています。
ファイルパス | 変更内容の概要 |
---|---|
ros2/kachaka_grpc_ros2_bridge/src/component/robot_info_component.cpp | sensor_msgs::msg::BatteryState のブリッジを追加し、非同期操作の開始と停止を管理する機能を統合。 |
sequenceDiagram
participant RobotInfoComponent
participant KachakaApiStub
participant ROS2TopicBridge
RobotInfoComponent->>KachakaApiStub: getBatteryInfo()
KachakaApiStub-->>RobotInfoComponent: GetBatteryInfoResponse
RobotInfoComponent->>ROS2TopicBridge: Convert and Publish BatteryState
ROS2TopicBridge-->>ROS2TopicBridge: StartAsync
ROS2TopicBridge-->>ROS2TopicBridge: StopAsync
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
すみません、run_docker.sh は弊社内部の docker imge を使っているので使えないようですね。
./tools/lint/local_run.sh を Ubuntu 22.04 の環境で実行して頂くか、
docker buildx build -t kachaka-api.lint --load -f tools/lint/Dockerfile -f tools/lint/Dockerfile .
してから tools/lint/run_docker.sh のイメージ名を kachaka-api.lint
に書き換える、
などの対処が必要そうです。
ありがとうございます。 CI の lint も通ったので、マージしておきます。
バッテリ残量と充電状態をROS2のトピックで出力するようにしました。