[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
@@ -2,87 +2,170 @@
id: wiki-2026-0508-autonomous-vehicle-path-planning
title: Autonomous Vehicle Path Planning
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AI-PATHPLAN]
aliases: [AV Path Planning, Self-Driving Planning, Motion Planning]
duplicate_of: none
source_trust_level: A
confidence_score: 0.98
tags: [Path Planning, "A* Algorithm", Robotics, Autonomous Vehicle]
confidence_score: 0.94
verification_status: applied
tags: [robotics, autonomous-driving, motion-planning, mpc, av]
raw_sources: []
last_reinforced: 2026-04-20
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: unspecified
framework: unspecified
language: Python/C++
framework: Apollo/Autoware/OpenPlanner
---
# [[Autonomous-Vehicle-Path-Planning|Autonomous-Vehicle-Path-Planning]] (자율주행 경로 계획)
# Autonomous Vehicle Path Planning
## 📌 한 줄 통찰 (The Karpathy Summary)
> 경로 계획은 '가장 빠른 길'을 찾는 것이 아니라, '안전하고 부드러우며 예측 가능한' 움직임을 실시간으로 설계하는 확률적 탐색이다.
## 한 줄
> **"매 perception 의 X — 매 prediction + decision + trajectory 의 closed-loop."**. AV path planning 의 perception output (objects, lanes, drivable area) → prediction (other agents) → behavior decision (lane change, yield) → trajectory (smooth, kinodynamic) → control. 매 2026 의 Tesla FSD v13 (end-to-end NN), Waymo (modular), Wayve LINGO (VLM-based), 모두 의 hybrid trend.
## 📖 구조화된 지식 (Synthesized Content)
- **Global Path Planning**:
- 출발지에서 목적지까지의 거시적인 경로를 설정한다. 고전적인 **A* (A-star)** 알고리즘이나 **Dijkstra** 알고리즘이 지도 데이터 위에서 작동한다.
- **Local Motion Planning (실시간 회피)**:
- 갑자기 튀어나오는 보행자나 장애물을 피하기 위한 미시적인 궤적 최적화. **RRT* (Rapidly-exploring Random Tree)**나 **Hybrid A*** 등이 사용된다.
- **[[Behavior|Behavior]]al Decision (판단 레이어)**:
- 차선 변경, 추월, 일단 정지 등 도로의 법규(Traffic Laws)와 에티켓을 반영한 의사결정 알고리즘과 물리적 제어를 결합한다.
## 매 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- 과거에는 규칙 기반(Rule-based) 알고리즘이 주류였으나, 최근에는 복잡한 도심 상황을 해결하기 위해 'End-to-End' 딥러닝 방식과 '전통적 플래닝'을 결합한 계층적 구조가 표준으로 자리 잡았다.
### 매 Architecture (Modular)
1. **Mission planner**: route (A→B) over road graph.
2. **Behavior planner**: discrete decision (FSM / POMDP / RL).
3. **Local planner / motion**: collision-free trajectory (Frenet, lattice, sampling, optimization).
4. **Trajectory tracker**: MPC / pure pursuit → steering + throttle.
## 🔗 지식 연결 (Graph)
- Related: [[Systemic_Simulation_Principles|Systemic_Simulation_Principles]] , Robotic Manipulation
- Context: [[Digital Twins|Digital Twins]]
### 매 Algorithms
- **Search**: A*, Hybrid A* (kinematic), RRT*, RRT-Connect.
- **Sampling**: lattice planner (predefined motion primitives).
- **Optimization**: iLQR, MPC, CILQR (cost = comfort + safety + progress).
- **Frenet frame**: lateral + longitudinal decoupling.
- **Learning-based**: ChauffeurNet, MotionLM, end-to-end (Tesla FSD v13).
- **Foundation model**: Wayve LINGO-2 / GAIA-2 — VLM + driving.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 Safety
- ISO 26262 / ISO 21448 (SOTIF).
- RSS (Responsibility-Sensitive Safety, Mobileye).
- Formal verification of decision layer.
- Out-of-distribution detection.
**언제 이 지식을 쓰는가:**
- *(TODO)*
### 매 응용
1. L4 robotaxi (Waymo, Cruise relaunch, Apollo Go).
2. L2+ ADAS (Tesla FSD, BYD, NIO Pilot).
3. Truck platooning (Aurora, Plus).
4. Last-mile delivery (Nuro).
**언제 쓰면 안 되는가:**
- *(TODO)*
## 💻 패턴
## 🧪 검증 상태 (Validation)
### Pattern 1 — Frenet trajectory generation
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
```python
import numpy as np
## 🧬 중복 검사 (Duplicate Check)
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
## 🕓 변경 이력 (Changelog)
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 💻 코드 패턴 (Code Patterns)
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
```text
# TODO
def frenet_quintic(s0, sd0, sdd0, s1, sd1, sdd1, T):
# solve quintic polynomial coeffs for s(t)
A = np.array([[T**3, T**4, T**5],
[3*T**2, 4*T**3, 5*T**4],
[6*T, 12*T**2, 20*T**3]])
b = np.array([s1 - s0 - sd0*T - 0.5*sdd0*T*T,
sd1 - sd0 - sdd0*T,
sdd1 - sdd0])
a3, a4, a5 = np.linalg.solve(A, b)
return [s0, sd0, sdd0/2, a3, a4, a5]
```
## 🤔 의사결정 기준 (Decision Criteria)
### Pattern 2 — Hybrid A* (sketch)
**선택 A를 써야 할 때:**
- *(TODO)*
```python
def hybrid_a_star(start, goal, grid, motion_primitives):
open_set = PriorityQueue()
open_set.put((0, start))
came_from = {}
g = {start: 0}
while not open_set.empty():
_, cur = open_set.get()
if reached(cur, goal): return reconstruct(came_from, cur)
for prim in motion_primitives:
nxt = apply(cur, prim)
if collides(nxt, grid): continue
new_g = g[cur] + prim.cost
if new_g < g.get(nxt, 1e18):
g[nxt] = new_g
f = new_g + reeds_shepp_heuristic(nxt, goal)
open_set.put((f, nxt))
came_from[nxt] = (cur, prim)
```
**선택 B를 써야 할 때:**
- *(TODO)*
### Pattern 3 — MPC trajectory tracking (acados / casadi)
**기본값:**
> *(TODO)*
```python
import casadi as ca
N = 20 # horizon
dt = 0.1
opti = ca.Opti()
X = opti.variable(4, N+1) # [x, y, theta, v]
U = opti.variable(2, N) # [steer, accel]
cost = 0
for k in range(N):
cost += ca.sumsqr(X[:2, k] - ref[:2, k]) + 0.1 * ca.sumsqr(U[:, k])
opti.subject_to(X[:, k+1] == bicycle_model(X[:, k], U[:, k], dt))
opti.minimize(cost)
opti.solver("ipopt")
sol = opti.solve()
```
## ❌ 안티패턴 (Anti-Patterns)
### Pattern 4 — RSS (longitudinal safe distance)
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
```python
def rss_safe_distance(v_rear, v_front, a_max_accel, a_max_brake, a_min_brake, rho=0.1):
return max(0,
v_rear * rho
+ 0.5 * a_max_accel * rho**2
+ (v_rear + a_max_accel * rho)**2 / (2 * a_min_brake)
- v_front**2 / (2 * a_max_brake))
```
### Pattern 5 — Behavior FSM
```python
class State(str, Enum): KEEP="keep"; LEFT="left"; RIGHT="right"; STOP="stop"
def transition(s, perception):
if perception.front_blocked and perception.left_clear: return State.LEFT
if perception.red_light: return State.STOP
return State.KEEP
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Highway lane change | Frenet + lattice + MPC |
| Parking | Hybrid A* + Reeds-Shepp |
| Urban intersection | POMDP / behavior tree + RSS check |
| Off-road / unstructured | RRT* + sampling MPC |
| End-to-end product (Tesla) | NN policy + safety guard |
**기본값**: Frenet planning + MPC tracking + RSS safety check + rule-based behavior FSM.
## 🔗 Graph
- 부모: [[Robotics]] · [[Motion-Planning]] · [[Optimal-Control-Theory]]
- 변형: [[A-Star]] · [[RRT]] · [[Model-Predictive-Control]]
- 응용: [[Robotaxi]] · [[ADAS]] · [[Autonomous-Truck]]
- Adjacent: [[Kalman-Filter]] · [[Particle-Filter]] · [[ISO-26262]]
## 🤖 LLM 활용
**언제**: scenario synthesis (corner cases), behavior reasoning prototype (LINGO-style), code generation for ROS / Apollo modules, log triage.
**언제 X**: real-time control loop (latency, safety cert), final RSS verification (formal methods).
## ❌ 안티패턴
- **Greedy lane change**: no comfort cost → jerky.
- **No prediction uncertainty**: 매 single mode 의 future — multi-modal essential.
- **Skipping kinodynamic check**: A* path 의 robot 의 unfollowable.
- **End-to-end without guard**: NN failure mode → safety violation.
## 🧪 검증 / 중복
- Verified (Apollo, Autoware open-source, Mobileye RSS paper, Waymo safety report).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — FULL content (Frenet, Hybrid A*, MPC, RSS) |