REPOSITORY
kitech/path-tracking-asw Private
[참조 MVP] 작업경로 추종 A-SW — 현재 자세와 경로에서 Pure Pursuit 방식의 조향 명령을 계산합니다.
https://git.agrithing.ai/kitech/path-tracking-asw.git a0afd4d feat: adopt cpp ACU SDV reference implementation
870c250 ci: add language-specific static and dynamic analysis
18a2162 docs: define component scope and interface contract
2dd63b7 ci: verify contract tests and evidence package
91d4eca feat: add executable reference MVP
767167a docs: define component scope and interface contract
1 items · main
·/ src/component.cpp
text · 508 B · efb1c97 Download
#include "component.hpp"#include <algorithm>#include <cmath>#include <stdexcept>namespace asw {TrackingCommand pure_pursuit(double target_x, double target_y, double heading_rad, double lookahead_m, double wheelbase_m) { if (lookahead_m <= 0 || wheelbase_m <= 0) throw std::invalid_argument("positive geometry required"); const double alpha = std::atan2(target_y, target_x) - heading_rad; return {std::atan2(2 * wheelbase_m * std::sin(alpha), std::max(lookahead_m, 0.01)), std::abs(target_y)};}}