frootspi_conductorは、FrootsPiシステムの中央制御モジュールです。外部システムから受信した統合コマンド(RobotCommand)を各ハードウェアモジュール向けの個別コマンドに分解して送信します。
- 外部システムからのRobotCommand受信
- コマンドの分解と各モジュールへの配信
- キッカー充電管理
- タイムアウト処理
command(RobotCommand): 外部システムからの統合ロボットコマンド
target_velocity(geometry_msgs/Twist): 車輪制御への目標速度dribble_power(frootspi_msgs/DribblePower): ドリブラーパワー設定kick_command(frootspi_msgs/KickCommand): キックコマンド
capacitor_charge_request(std_srvs/SetBool): キッカー充電要求
- RobotCommandメッセージ受信
- 速度成分を
target_velocityとして送信 - キックパワーが0より大きい場合、
kick_command送信 - ドリブルパワーを
dribble_powerとして送信 - 定期的にキッカー充電要求を送信
- タイムアウト設定
- 充電要求の送信間隔
# 単体起動
ros2 launch frootspi_examples conductor.launch.py
# コマンド送信例
ros2 topic pub /command consai_frootspi_msgs/msg/RobotCommand \
"{velocity_x: 1.0, velocity_y: 0.0, velocity_theta: 0.0, dribble_power: 0.5}"