# 底盘标定现场动作配置模板。
# 本文件固定四类底盘在真实标定车间中建议执行的动作序列。
# 真实车速、距离、角速度和模块 ID 必须按现场安全评估后再替换。

schema_version: 1
profile_name: workshop_chassis_calibration_action_profile

safety:
  max_linear_speed_ms: 0.1
  default_brake_when_finished: true
  default_timeout_sec: 60.0

data_capture:
  required_data_inputs:
    - chassis_motion_data_files
    - actuator_command_files
    - truth_trajectory_files
  start_before_motion_sec: 1.0
  stop_after_motion_sec: 1.0
  min_truth_hz: 20.0
  min_chassis_telemetry_hz: 20.0

chassis_profiles:
  ackermann:
    description: 阿克曼底盘标定动作序列
    calibration_targets:
      - ackermann.front_left_steer_zero_offset_deg
      - ackermann.front_right_steer_zero_offset_deg
      - ackermann.rear_left_wheel_radius_m
      - ackermann.rear_right_wheel_radius_m
      - ackermann.steering_ratio
    actions:
      - task_code: chassis.ackermann.straight_forward
        display_name: 阿克曼直线前进
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 1.0
          straight_line.target_speed_ms: 0.1
          straight_line.reverse: false
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.ackermann.straight_reverse
        display_name: 阿克曼直线倒车
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 0.6
          straight_line.target_speed_ms: 0.08
          straight_line.reverse: true
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.ackermann.arc_left
        display_name: 阿克曼左圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: false
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.ackermann.arc_right
        display_name: 阿克曼右圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: true
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.ackermann.steering_sweep
        display_name: 阿克曼舵角扫动
        primitive_type: steering_sweep
        metadata:
          steering_sweep.target_angle_deg: 0.0
          steering_sweep.sweep_amplitude_deg: 8.0
          steering_sweep.sweep_frequency_hz: 0.2
          steering_sweep.duration_sec: 12.0
          brake_when_finished: true
          timeout_sec: 30.0

  differential:
    description: 差速轮底盘标定动作序列
    calibration_targets:
      - differential.left_wheel_radius_m
      - differential.right_wheel_radius_m
      - differential.axle_track_width_m
    actions:
      - task_code: chassis.differential.straight_forward
        display_name: 差速直线前进
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 1.0
          straight_line.target_speed_ms: 0.1
          straight_line.reverse: false
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.differential.straight_reverse
        display_name: 差速直线倒车
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 0.6
          straight_line.target_speed_ms: 0.08
          straight_line.reverse: true
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.differential.rotate_left
        display_name: 差速左原地旋转
        primitive_type: in_place_rotation
        metadata:
          in_place_rotation.target_yaw_deg: 90.0
          in_place_rotation.target_angular_vel_deg_s: 10.0
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.differential.rotate_right
        display_name: 差速右原地旋转
        primitive_type: in_place_rotation
        metadata:
          in_place_rotation.target_yaw_deg: -90.0
          in_place_rotation.target_angular_vel_deg_s: 10.0
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.differential.arc_left
        display_name: 差速左转圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: false
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.differential.arc_right
        display_name: 差速右转圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: true
          brake_when_finished: true
          timeout_sec: 45.0

  single_steer_wheel:
    description: 单舵轮底盘标定动作序列
    calibration_targets:
      - single_steer.drive_wheel_radius_m
      - single_steer.steer_zero_offset_deg
      - single_steer.steering_ratio
      - single_steer.drive_encoder_scale
    actions:
      - task_code: chassis.single_steer.straight_forward
        display_name: 单舵轮直线前进
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 1.0
          straight_line.target_speed_ms: 0.1
          straight_line.reverse: false
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.single_steer.steering_sweep
        display_name: 单舵轮舵角扫动
        primitive_type: steering_sweep
        metadata:
          steering_sweep.target_angle_deg: 0.0
          steering_sweep.sweep_amplitude_deg: 10.0
          steering_sweep.sweep_frequency_hz: 0.2
          steering_sweep.duration_sec: 12.0
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.single_steer.arc_left
        display_name: 单舵轮左圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: false
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.single_steer.arc_right
        display_name: 单舵轮右圆弧
        primitive_type: arc
        metadata:
          arc.target_speed_ms: 0.08
          arc.radius_m: 1.0
          arc.sweep_angle_deg: 45.0
          arc.clockwise: true
          brake_when_finished: true
          timeout_sec: 45.0

  multi_steer_wheel:
    description: 多舵轮底盘标定动作序列
    calibration_targets:
      - multi_steer.modules[].wheel_radius_m
      - multi_steer.modules[].steer_zero_offset_deg
      - multi_steer.modules[].module_pos_x_m
      - multi_steer.modules[].module_pos_y_m
    actions:
      - task_code: chassis.multi_steer.straight_forward
        display_name: 多舵轮直线前进
        primitive_type: straight_line
        metadata:
          straight_line.target_distance_m: 1.0
          straight_line.target_speed_ms: 0.1
          straight_line.reverse: false
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.multi_steer.lateral_left
        display_name: 多舵轮左横移
        primitive_type: lateral_translation
        metadata:
          lateral_translation.target_speed_ms: 0.06
          lateral_translation.target_distance_m: 0.5
          lateral_translation.move_left: true
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.multi_steer.lateral_right
        display_name: 多舵轮右横移
        primitive_type: lateral_translation
        metadata:
          lateral_translation.target_speed_ms: 0.06
          lateral_translation.target_distance_m: 0.5
          lateral_translation.move_left: false
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.multi_steer.diagonal_forward_left
        display_name: 多舵轮左前斜移
        primitive_type: diagonal_motion
        metadata:
          diagonal_motion.target_speed_ms: 0.06
          diagonal_motion.target_distance_m: 0.5
          diagonal_motion.heading_deg: 45.0
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.multi_steer.diagonal_forward_right
        display_name: 多舵轮右前斜移
        primitive_type: diagonal_motion
        metadata:
          diagonal_motion.target_speed_ms: 0.06
          diagonal_motion.target_distance_m: 0.5
          diagonal_motion.heading_deg: -45.0
          brake_when_finished: true
          timeout_sec: 45.0
      - task_code: chassis.multi_steer.module_alignment
        display_name: 多舵轮模块零位检查
        primitive_type: module_alignment
        metadata:
          module_alignment.module_ids:
            - front_left
            - front_right
            - rear_left
            - rear_right
          module_alignment.target_zero_deg: 0.0
          module_alignment.tolerance_deg: 1.0
          brake_when_finished: true
          timeout_sec: 30.0
      - task_code: chassis.multi_steer.coordinated_steering
        display_name: 多舵轮协同转向
        primitive_type: coordinated_steering
        metadata:
          coordinated_steering.module_ids:
            - front_left
            - front_right
            - rear_left
            - rear_right
          coordinated_steering.target_angle_deg: 20.0
          coordinated_steering.hold_time_sec: 5.0
          brake_when_finished: true
          timeout_sec: 30.0
