controller_manager:
  ros__parameters:
    update_rate: 50  # 控制器更新频率 (Hz) — matches the physical robot (ESP32 auto-report rate)
    use_sim_time: true  # 使用仿真时间

    # 定义关节状态广播器
    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster

    # 定义麦克纳姆轮驱动控制器
    mecanum_drive_controller:
      type: mecanum_drive_controller/MecanumDriveController

# ─────────────────────────────────────────────────────────────────────────────
# Mecanum drive controller — kept IN SYNC with the physical robot config at
# agv_pro_bringup/config/ros2_controllers.yaml. Only the hardware plugin differs
# (gz_ros2_control/GazeboSimSystem here vs agv_pro_hardware/AgvProHardwareInterface
# on the real robot); the controller parameters are identical.
#
# ─────────────────────────────────────────────────────────────────────────────
mecanum_drive_controller:
  ros__parameters:
    front_left_wheel_command_joint_name:  front_left_wheel_joint
    front_right_wheel_command_joint_name: front_right_wheel_joint
    rear_left_wheel_command_joint_name:   rear_left_wheel_joint
    rear_right_wheel_command_joint_name:  rear_right_wheel_joint

    odom_frame_id:  odom
    base_frame_id:  base_footprint
    enable_odom_tf: true

    kinematics:
      wheels_radius: 0.072  # 轮子半径 (wheel centre height above ground)
      # sum_of_robot_center_projection_on_X_Y_axis = lx + ly (0.172 + 0.180)
      sum_of_robot_center_projection_on_X_Y_axis: 0.352

