#include "chassis_calibration_service/chassis_calibration_common.hpp"

namespace chassis_calibration_service
{

bool AckermannChassisAlgorithm::run(
  const ChassisCalibrationInput & input,
  ChassisCalibrationOutput & output,
  std::string & failure_reason) const
{
  (void)failure_reason;

  // 阿克曼底盘算法填充边界：
  // - 输入优先读取三类 CSV：chassis_motion_data_files、actuator_command_files、truth_trajectory_files。
  // - 输出必须填写 selected_specific_params=ACKERMANN，并写入 ackermann 专属参数和 validation_summary。
  // - 详细字段合同见 src/docs/chassis_calibration_algorithm_contract.md。
  fill_common_result(input, output);
  select_specific_params(
    output,
    calibration_chassis_interfaces::msg::ChassisSpecificParamsType::ACKERMANN);
  output.response.result.data_quality_passed = false;
  output.response.result.suitable_for_commit = false;
  output.response.result.validation_summary.auto_acceptance_passed = false;
  output.response.result.message = "阿克曼底盘标定模板已执行；当前仅验证接口和数据输入，真实算法待填充。";
  output.response.result.recommended_parameter_version = "ackermann_template_v1";
  return true;
}

}  // namespace chassis_calibration_service
