mode: site
vehicle_id: replace_with_real_vehicle_id

workshop_pc:
  gateway:
    vehicle_host: 192.168.10.42
    vehicle_port: 9000
    timeout_ms: 5000

vehicle_agent:
  type: real_vehicle_agent
  vendor_interface: replace_with_can_plc_sdk_or_controller
  external_pose_transport: wifi6
  internal_ackermann_command_topic: /vehicle/replace_with_real_vehicle_id/internal/ackermann_cmd
  internal_state_topic: /vehicle/replace_with_real_vehicle_id/internal/state
  internal_health_topic: /vehicle/replace_with_real_vehicle_id/internal/health
  internal_time_sync_topic: /vehicle/replace_with_real_vehicle_id/internal/time_sync_status
  wheel_base_m: measured_on_site
  max_steering_angle_rad: measured_on_site

vehicle_sensor_agent:
  type: real_vehicle_sensor_agent
  front_camera_sensor_id: replace_with_front_camera_id
  down_camera_sensor_id: replace_with_down_camera_id
  lidar_3d_sensor_id: replace_with_lidar_3d_id
  lidar_2d_sensor_id: replace_with_lidar_2d_id
  imu_sensor_id: replace_with_imu_id
  sensor_data_transport: wifi6
  sensor_link_status_topic: /vehicle/replace_with_real_vehicle_id/internal/sensor_link_status

external_pose_bridge:
  type: external_pose_wifi6_bridge
  source_topic: /workshop/external_localization/vehicle/pose
  reference_source_name: workshop_four_lidar_ball_truth
  max_hz: 30.0

external_localization:
  # 车间电脑侧外部真值定位模板。
  # 四角 LiDAR + 车端标定球算法由这个节点发布 ExternalLocalizationTelemetry。
  type: workshop_four_lidar_ball
  config_file: /data/agv_calib/replace_with_site_or_line_id/four_lidar_ball.yaml
  output_topic: /workshop/external_localization/vehicle/pose
  diagnostics_topic: /workshop/external_localization/diagnostics
  reference_source_name: workshop_four_lidar_ball_truth
  workcell_zone_id: replace_with_workcell_zone_id
  recording_session_dir: /data/agv_calib/replace_with_site_or_line_id/session_xxx
  recording_dataset_index_path: /data/agv_calib/replace_with_site_or_line_id/session_xxx/dataset_index.yaml

chassis_calibration:
  # 现场底盘标定数据模板。
  # 这里只定义底盘标定算法的数据输入，不直接控制车辆。
  type: workshop_chassis_data
  chassis_type: ackermann
  data_config_file: /data/agv_calib/replace_with_site_or_line_id/chassis_data.yaml
  action_profile_file: /data/agv_calib/replace_with_site_or_line_id/chassis_action_profile.yaml
  action_profile_tool: src/site_deployment/workshop_chassis_calibration_real/chassis_action_profile.py
  action_profile_capture_runner: src/site_deployment/workshop_chassis_calibration_real/run_chassis_profile_capture.py
  capture_tool: src/site_deployment/workshop_chassis_calibration_real/capture_chassis_session.py
  parameter_commit_staging_tool: src/site_deployment/workshop_chassis_calibration_real/stage_chassis_parameter_commit.py
  parameter_approval_handoff_tool: src/site_deployment/workshop_chassis_calibration_real/approve_chassis_pending_parameters.py
  algorithm_result_finalize_tool: src/deployment/tools/finalize_site_session.py
  estimated_params_template: src/site_deployment/workshop_chassis_calibration_real/config/chassis_estimated_params_template.yaml
  replay_smoke_tool: src/site_deployment/workshop_chassis_calibration_real/replay_chassis_smoke.py
  recording_session_dir: /data/agv_calib/replace_with_site_or_line_id/session_xxx
  recording_dataset_index_path: /data/agv_calib/replace_with_site_or_line_id/session_xxx/dataset_index.yaml
  chassis_motion_data_file: chassis/chassis_motion.csv
  actuator_command_file: chassis/actuator_commands.csv
  truth_trajectory_file: external/truth_trajectory.csv

control_calibration:
  # 现场运控参数标定数据模板。
  # 这里只定义运控评估算法的数据输入和参数交接产物，不直接实现车端写参。
  type: workshop_control_data
  chassis_type: ackermann
  control_axis: combined
  controller_algorithm: mpc
  control_role: path_tracking_outer_loop
  data_config_file: /data/agv_calib/replace_with_site_or_line_id/control_data.yaml
  capture_tool: src/site_deployment/workshop_control_calibration_real/capture_control_session.py
  evaluation_profile_file: src/site_deployment/workshop_control_calibration_real/config/control_evaluation_profile.yaml
  evaluation_profile_tool: src/site_deployment/workshop_control_calibration_real/control_evaluation_profile.py
  evaluation_profile_capture_runner: src/site_deployment/workshop_control_calibration_real/run_control_profile_capture.py
  evaluation_profile_capture_smoke_tool: src/site_deployment/workshop_control_calibration_real/smoke_test_control_profile_capture.py
  parameter_commit_staging_tool: src/site_deployment/workshop_control_calibration_real/stage_control_parameter_commit.py
  parameter_approval_handoff_tool: src/site_deployment/workshop_control_calibration_real/approve_control_pending_parameters.py
  algorithm_result_finalize_tool: src/deployment/tools/finalize_site_session.py
  estimated_params_template: src/site_deployment/workshop_control_calibration_real/config/control_estimated_params_template.yaml
  role_profiles: src/site_deployment/workshop_control_calibration_real/config/control_role_profiles.yaml
  estimated_params_templates_by_chassis:
    ackermann: src/site_deployment/workshop_control_calibration_real/config/control_estimated_params_ackermann_template.yaml
    differential: src/site_deployment/workshop_control_calibration_real/config/control_estimated_params_differential_template.yaml
    single_steer_wheel: src/site_deployment/workshop_control_calibration_real/config/control_estimated_params_single_steer_wheel_template.yaml
    multi_steer_wheel: src/site_deployment/workshop_control_calibration_real/config/control_estimated_params_multi_steer_wheel_template.yaml
  replay_smoke_tool: src/site_deployment/workshop_control_calibration_real/replay_control_smoke.py
  recording_session_dir: /data/agv_calib/replace_with_site_or_line_id/session_xxx
  recording_dataset_index_path: /data/agv_calib/replace_with_site_or_line_id/session_xxx/dataset_index.yaml
  control_evaluation_data_file: control/control_eval.csv
  reference_signal_file: control/reference_signal.csv
  chassis_response_file: control/chassis_response.csv
  truth_trajectory_file: external/truth_trajectory.csv

sensor_calibration:
  # 现场传感器标定数据模板。
  # 这里只定义传感器标定算法的数据输入、任务 profile 和参数交接产物。
  type: workshop_sensor_data
  profile_file: src/site_deployment/workshop_sensor_calibration_real/config/sensor_calibration_profile.yaml
  profile_tool: src/site_deployment/workshop_sensor_calibration_real/sensor_calibration_profile.py
  dataset_manifest_tool: src/site_deployment/workshop_sensor_calibration_real/sensor_dataset_manifest.py
  preprocess_tool: src/site_deployment/workshop_sensor_calibration_real/sensor_preprocess_pipeline.py
  data_contract: src/site_deployment/workshop_sensor_calibration_real/sensor_data_contract.md
  parameter_commit_staging_tool: src/site_deployment/workshop_sensor_calibration_real/stage_sensor_parameter_commit.py
  parameter_approval_handoff_tool: src/site_deployment/workshop_sensor_calibration_real/approve_sensor_pending_parameters.py
  parameter_apply_handoff_tool: src/site_deployment/workshop_sensor_calibration_real/apply_sensor_parameter_handoff.py
  algorithm_result_finalize_tool: src/deployment/tools/finalize_site_session.py
  estimated_params_template: src/site_deployment/workshop_sensor_calibration_real/config/sensor_estimated_params_template.yaml
  local_smoke_tool: src/site_deployment/workshop_sensor_calibration_real/smoke_test_sensor_calibration_real.py
  recording_session_dir: /data/agv_calib/replace_with_site_or_line_id/session_xxx
  recording_dataset_index_path: /data/agv_calib/replace_with_site_or_line_id/session_xxx/dataset_index.yaml
  image_sample_file: sensor/front_camera/images.yaml
  imu_sample_file: sensor/imu/imu_samples.mcap
  pointcloud_sample_file: sensor/lidar_3d/pointclouds.mcap
  laser_scan_sample_file: sensor/lidar_2d/scans.mcap
  target_detection_file: sensor/front_camera/charuco_detections.json
  robot_pose_sample_file: sensor/hand_eye/robot_poses.csv

workshop_sensor_ingest:
  type: workshop_sensor_ingest
  capture_session_tool: src/site_deployment/workshop_sensor_ingest_real/site_session_capture.py
  publish_prefix: /workshop/vehicle_sensor
  poll_hz: 15.0
  max_payload_bytes: 4194304

algorithm_data_inputs:
  # 每次标定会话对应的 ROS 参数文件，由 minimal_workshop_demo.launch.py
  # 通过 data_input_params_file:=... 注入。
  ros_params_file: /data/agv_calib/replace_with_site_or_line_id/session_xxx/site_data_input.yaml
  # 真实采集或数据接入程序应把每次会话的数据集写到这里。
  dataset_root: /data/agv_calib/replace_with_site_or_line_id
  dataset_index_name: dataset_index.yaml
  # 推荐由 dataset_index_to_site_data_input.py 从 dataset_index.yaml 自动生成。
  converter: src/deployment/tools/dataset_index_to_site_data_input.py
  # 真实采集/ingest 会话结束时推荐调用这个收尾入口。
  session_finalizer: src/deployment/tools/finalize_site_session.py

orchestrator_session:
  # 从现场 profile、底盘动作 profile、运控评估 profile、传感器标定 profile 自动生成总控 requested_tasks。
  session_config_builder: src/deployment/tools/build_workshop_session_config.py
  default_tasks: external,chassis,control,sensor_intrinsic
  generated_session_config_file: /data/agv_calib/replace_with_site_or_line_id/session_xxx/workshop_session_config.yaml

frames:
  map: workshop
  base_link: rear_axle_center

targets:
  down_camera_charuco:
    square_size_m: measured_on_site
    squares_x: measured_on_site
    squares_y: measured_on_site
  lidar_2d_corner_bay:
    measured_planes: required

safety:
  max_speed_mps: 0.1
  command_timeout_sec: 1.0
  stop_on_disconnect: true
  emergency_stop_required: true
