# 运控评估现场任务配置模板。
# 本文件固定四类底盘在真实标定车间中建议执行的运控评估序列。
# 真实速度、轨迹长度和停车点必须按现场安全评估后再替换。

schema_version: 1
profile_name: workshop_control_evaluation_profile

safety:
  max_linear_speed_ms: 0.2
  max_accel_ms2: 0.15
  default_external_pose_source_id: workshop_external_localization

data_capture:
  required_data_inputs:
    - control_evaluation_data_files
    - reference_signal_files
    - chassis_response_files
    - truth_trajectory_files
  start_before_task_sec: 1.0
  stop_after_task_sec: 1.0
  min_control_telemetry_hz: 20.0
  min_chassis_telemetry_hz: 20.0
  min_truth_hz: 20.0

chassis_profiles:
  ackermann:
    description: 阿克曼底盘运控评估序列
    calibration_targets:
      - ackermann.path_tracking_outer_loop
      - ackermann.speed_loop
      - ackermann.steering_angle_inner_loop
      - ackermann.stop_accuracy
    actions:
      - task_code: control.ackermann.path_tracking_s_curve
        display_name: 阿克曼低速 S 形轨迹跟踪
        selected_task: trajectory_tracking
        control_axis: combined
        controller_algorithm: pure_pursuit
        control_role: path_tracking_outer_loop
        trajectory_tracking:
          trajectory_id: ackermann_s_curve_low_speed
          stop_at_end: true
          timeout_sec: 60.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          segment_index: 0
          total_segments: 1
          is_final_segment: true
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.10
            - x_m: 0.6
              y_m: 0.10
              yaw_rad: 0.12
              target_speed_ms: 0.12
            - x_m: 1.2
              y_m: -0.10
              yaw_rad: -0.12
              target_speed_ms: 0.12
            - x_m: 1.8
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.10
      - task_code: control.ackermann.speed_step_low
        display_name: 阿克曼低速速度阶跃
        selected_task: velocity_step
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: speed_loop
        loop_name: speed
        velocity_step:
          target_velocity_ms: 0.15
          hold_time_sec: 8.0
          settle_before_step_sec: 2.0
      - task_code: control.ackermann.steering_response_arc
        display_name: 阿克曼转角响应轨迹
        selected_task: trajectory_tracking
        control_axis: lateral_control
        controller_algorithm: pid
        control_role: steering_angle_inner_loop
        loop_name: steering_angle
        trajectory_tracking:
          trajectory_id: ackermann_steering_response_arc
          stop_at_end: true
          timeout_sec: 45.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 0.5
              y_m: 0.08
              yaw_rad: 0.15
              target_speed_ms: 0.08
            - x_m: 1.0
              y_m: 0.28
              yaw_rad: 0.30
              target_speed_ms: 0.08
      - task_code: control.ackermann.stop_accuracy
        display_name: 阿克曼停车精度
        selected_task: stop_accuracy
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: speed_loop
        loop_name: speed
        stop_accuracy:
          target_stop_x_m: 1.2
          target_stop_y_m: 0.0
          target_stop_yaw_rad: 0.0
          timeout_sec: 45.0

  differential:
    description: 差速轮底盘运控评估序列
    calibration_targets:
      - differential.path_tracking_outer_loop
      - differential.speed_loop
      - differential.yaw_rate_loop
      - differential.acceleration_loop
    actions:
      - task_code: control.differential.path_tracking_line
        display_name: 差速低速直线轨迹跟踪
        selected_task: trajectory_tracking
        control_axis: combined
        controller_algorithm: pure_pursuit
        control_role: path_tracking_outer_loop
        trajectory_tracking:
          trajectory_id: differential_line_low_speed
          stop_at_end: true
          timeout_sec: 45.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.10
            - x_m: 0.8
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.12
            - x_m: 1.6
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.10
      - task_code: control.differential.speed_step_low
        display_name: 差速低速速度阶跃
        selected_task: velocity_step
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: speed_loop
        loop_name: speed
        velocity_step:
          target_velocity_ms: 0.15
          hold_time_sec: 8.0
          settle_before_step_sec: 2.0
      - task_code: control.differential.yaw_rate_arc
        display_name: 差速角速度响应圆弧
        selected_task: trajectory_tracking
        control_axis: lateral_control
        controller_algorithm: pid
        control_role: yaw_rate_loop
        loop_name: yaw_rate
        trajectory_tracking:
          trajectory_id: differential_yaw_rate_arc
          stop_at_end: true
          timeout_sec: 45.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 0.45
              y_m: 0.08
              yaw_rad: 0.18
              target_speed_ms: 0.08
            - x_m: 0.85
              y_m: 0.30
              yaw_rad: 0.36
              target_speed_ms: 0.08
      - task_code: control.differential.accel_decel_low
        display_name: 差速低速加减速响应
        selected_task: acceleration_deceleration
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: acceleration_loop
        loop_name: acceleration
        accel_decel:
          start_velocity_ms: 0.05
          target_velocity_ms: 0.16
          target_accel_ms2: 0.08
          hold_time_sec: 5.0

  single_steer_wheel:
    description: 单舵轮底盘运控评估序列
    calibration_targets:
      - single_steer.path_tracking_outer_loop
      - single_steer.speed_loop
      - single_steer.steering_angle_inner_loop
      - single_steer.stop_accuracy
    actions:
      - task_code: control.single_steer.path_tracking_arc
        display_name: 单舵轮低速圆弧轨迹跟踪
        selected_task: trajectory_tracking
        control_axis: combined
        controller_algorithm: pure_pursuit
        control_role: path_tracking_outer_loop
        trajectory_tracking:
          trajectory_id: single_steer_arc_low_speed
          stop_at_end: true
          timeout_sec: 45.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.09
            - x_m: 0.55
              y_m: 0.08
              yaw_rad: 0.12
              target_speed_ms: 0.10
            - x_m: 1.10
              y_m: 0.28
              yaw_rad: 0.24
              target_speed_ms: 0.09
      - task_code: control.single_steer.speed_step_low
        display_name: 单舵轮低速速度阶跃
        selected_task: velocity_step
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: speed_loop
        loop_name: speed
        velocity_step:
          target_velocity_ms: 0.14
          hold_time_sec: 8.0
          settle_before_step_sec: 2.0
      - task_code: control.single_steer.steering_response_s_curve
        display_name: 单舵轮舵角响应 S 形轨迹
        selected_task: trajectory_tracking
        control_axis: lateral_control
        controller_algorithm: pid
        control_role: steering_angle_inner_loop
        loop_name: steering_angle
        trajectory_tracking:
          trajectory_id: single_steer_steering_response_s_curve
          stop_at_end: true
          timeout_sec: 60.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 0.5
              y_m: 0.10
              yaw_rad: 0.12
              target_speed_ms: 0.08
            - x_m: 1.0
              y_m: -0.10
              yaw_rad: -0.12
              target_speed_ms: 0.08
            - x_m: 1.5
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
      - task_code: control.single_steer.stop_accuracy
        display_name: 单舵轮停车精度
        selected_task: stop_accuracy
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: speed_loop
        loop_name: speed
        stop_accuracy:
          target_stop_x_m: 1.0
          target_stop_y_m: 0.0
          target_stop_yaw_rad: 0.0
          timeout_sec: 45.0

  multi_steer_wheel:
    description: 多舵轮底盘运控评估序列
    calibration_targets:
      - multi_steer.path_tracking_outer_loop
      - multi_steer.wheel_speed_inner_loop
      - multi_steer.module_steering_inner_loop
      - multi_steer.stop_accuracy
    actions:
      - task_code: control.multi_steer.path_tracking_lateral_offset
        display_name: 多舵轮横向偏移轨迹跟踪
        selected_task: trajectory_tracking
        control_axis: combined
        controller_algorithm: mpc
        control_role: path_tracking_outer_loop
        trajectory_tracking:
          trajectory_id: multi_steer_lateral_offset_low_speed
          stop_at_end: true
          timeout_sec: 60.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 0.4
              y_m: 0.2
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 0.8
              y_m: 0.2
              yaw_rad: 0.0
              target_speed_ms: 0.08
            - x_m: 1.2
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.08
      - task_code: control.multi_steer.wheel_speed_step_low
        display_name: 多舵轮轮速阶跃
        selected_task: velocity_step
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: wheel_speed_inner_loop
        loop_name: module_wheel_speed
        velocity_step:
          target_velocity_ms: 0.12
          hold_time_sec: 8.0
          settle_before_step_sec: 2.0
      - task_code: control.multi_steer.module_steering_response
        display_name: 多舵轮模块转角响应轨迹
        selected_task: trajectory_tracking
        control_axis: lateral_control
        controller_algorithm: pid
        control_role: module_steering_inner_loop
        loop_name: module_steering_angle
        trajectory_tracking:
          trajectory_id: multi_steer_module_steering_response
          stop_at_end: true
          timeout_sec: 60.0
          required_external_pose_source_id: workshop_external_localization
          max_external_pose_age_ms: 100.0
          min_external_pose_quality_score: 0.7
          path:
            - x_m: 0.0
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.06
            - x_m: 0.3
              y_m: 0.18
              yaw_rad: 0.0
              target_speed_ms: 0.06
            - x_m: 0.6
              y_m: -0.18
              yaw_rad: 0.0
              target_speed_ms: 0.06
            - x_m: 0.9
              y_m: 0.0
              yaw_rad: 0.0
              target_speed_ms: 0.06
      - task_code: control.multi_steer.stop_accuracy
        display_name: 多舵轮停车精度
        selected_task: stop_accuracy
        control_axis: longitudinal_control
        controller_algorithm: pid
        control_role: wheel_speed_inner_loop
        loop_name: module_wheel_speed
        stop_accuracy:
          target_stop_x_m: 0.8
          target_stop_y_m: 0.0
          target_stop_yaw_rad: 0.0
          timeout_sec: 45.0
