[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,64 +1,204 @@
|
||||
---
|
||||
id: wiki-2026-0508-self-driving-car-foundations
|
||||
title: Self Driving Car Foundations
|
||||
title: Self-Driving Car Foundations
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [ROBOT-AUTO-DRIVE-001]
|
||||
aliases: [Autonomous Driving, AV Stack, Self-Driving]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 1.0
|
||||
tags: [ai, autonomous-driving, Robotics, Computer-Vision, Sensor-Fusion, slam, path-planning]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [autonomous-driving, av, perception, planning, end-to-end]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-26
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: pytorch
|
||||
---
|
||||
|
||||
# Self-Driving Car Foundations (자율주행 자동차 기초)
|
||||
# Self-Driving Car Foundations
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "감각의 통합(Sensor Fusion)을 통해 세계를 재구성하고, 예측과 계획의 루프를 초단위로 회전시켜 물리적 공간에서의 '안전한 자율성'을 성취하라" — 인공지능, 센서 기술, 제어 공학을 결합하여 인간의 개입 없이 스스로 목적지까지 주행하는 차량 시스템의 핵심 원리.
|
||||
## 매 한 줄
|
||||
> **"매 sense → predict → plan → act, with redundancy at every layer"**. 매 modular stack (perception/prediction/planning/control) 매 dominant historically, 매 2026 trend → end-to-end neural (Tesla FSD v12, Wayve GAIA-2). 매 SAE L4 production: Waymo, Cruise(suspended), Zoox.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** "Perceive-Predict-Plan-Act and Safety-critical Redundancy" — 주변 환경을 3D로 인지하고, 보행자와 차량의 의도를 예측하며, 충돌 없는 최적 경로를 실시간으로 생성하여 물리적 구동계로 전달하는 계층적 제어 패턴.
|
||||
- **핵심 기술 스택:**
|
||||
- **Perception:** 객체 탐지(Object Detection), 차선 인식, 신호등 감지.
|
||||
- **Sensor Fusion:** 카메라(시각), 라이다(정밀 거리), 레이더(속도) 데이터의 결합.
|
||||
- **Localization:** HD 지도를 기반으로 센서 데이터를 매칭하여 수 cm 단위의 위치 파악.
|
||||
- **Planning & Control:** 동적 장애물을 회피하는 경로 생성 및 가속/제동/조향 제어.
|
||||
- **의의:** 사고 감소, 교통 효율 증대, 이동의 자유 확대 등 사회적 가치를 창출하는 AI 기술의 정점이자 종합 전시장.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 모든 상황을 규칙으로 코딩하던 '모듈형 방식'에서 벗어나, 이제는 인지부터 제어까지 신경망 하나로 처리하는 '엔드 투 엔드(End-to-End) 학습'과 대규모 가상 시뮬레이션 환경에서의 강화학습이 주류 기술로 부상함.
|
||||
- **정책 변화:** Antigravity 프로젝트는 자율주행의 핵심인 '예측과 계획' 알고리즘 지식을 바탕으로, 에이전트의 작업 스케줄링 및 리소스 배분 전략을 고도화함.
|
||||
### 매 Sensor stack
|
||||
- **Camera**: 매 dense semantic, 매 RGB perception.
|
||||
- **Lidar**: 매 sparse depth (Waymo, Zoox).
|
||||
- **Radar**: 매 velocity, 매 weather-robust.
|
||||
- **GNSS+IMU**: 매 ego pose; 매 HD map alignment.
|
||||
- Tesla pure-vision: 매 cameras + neural net only.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Robotics-Foundations|Robotics-Foundations]], Computer-Vision-Fundamentals, [[Point-Cloud-Processing|Point-Cloud-Processing]], [[Reinforcement-Learning|Reinforcement-Learning]]
|
||||
- **Raw Source:** 10_Wiki/Topics/AI/Self-Driving-Car-Foundations.md
|
||||
### 매 Modular pipeline
|
||||
1. **Perception**: 3D detection (CenterPoint, BEVFormer), segmentation, lane detection.
|
||||
2. **Prediction**: 매 multi-agent trajectory (MTR, Wayformer).
|
||||
3. **Planning**: 매 sample-based (lattice), optimization (MPC), or learned.
|
||||
4. **Control**: PID, MPC, LQR (매 lateral + longitudinal).
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 End-to-end (E2E) trend
|
||||
- **Tesla FSD v12**: 매 video → controls neural net.
|
||||
- **Wayve GAIA-2**: 매 generative world model + policy.
|
||||
- **UniAD** (CVPR 2023 best paper): 매 unified perception+planning transformer.
|
||||
- 매 advantage: 매 less brittle handoff; 매 disadvantage: 매 interpretability.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### 매 SAE levels
|
||||
- L2 (ADAS): 매 hands-on, driver responsible.
|
||||
- L3 (Mercedes Drive Pilot): 매 hands-off in conditions.
|
||||
- L4 (Waymo, Zoox): 매 ODD-bound full autonomy.
|
||||
- L5: 매 anywhere — 매 not yet achieved.
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### 매 응용
|
||||
1. Robotaxi (Waymo One, Zoox launch 2024).
|
||||
2. Trucking (Aurora, Kodiak).
|
||||
3. ADAS consumer (Tesla, Mercedes).
|
||||
4. Last-mile delivery (Nuro).
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
## 💻 패턴
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
### BEV perception (BEVFormer-style)
|
||||
```python
|
||||
import torch.nn as nn
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
class BEVPerception(nn.Module):
|
||||
def __init__(self, n_cams=6, bev_h=200, bev_w=200):
|
||||
super().__init__()
|
||||
self.image_backbone = ResNet50()
|
||||
self.bev_queries = nn.Parameter(torch.randn(bev_h * bev_w, 256))
|
||||
self.spatial_attn = DeformableAttention()
|
||||
self.det_head = DetectionHead(num_classes=10)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
def forward(self, multi_cam_imgs, cam_intrinsics, cam_extrinsics):
|
||||
feats = [self.image_backbone(img) for img in multi_cam_imgs]
|
||||
bev = self.spatial_attn(self.bev_queries, feats, cam_intrinsics, cam_extrinsics)
|
||||
boxes_3d = self.det_head(bev)
|
||||
return boxes_3d
|
||||
```
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
### Trajectory prediction (multimodal)
|
||||
```python
|
||||
class MultiModalPredictor(nn.Module):
|
||||
def __init__(self, k_modes=6):
|
||||
super().__init__()
|
||||
self.k = k_modes
|
||||
self.encoder = AgentEncoder()
|
||||
self.mode_head = nn.Linear(256, k_modes * 80) # 80 = 8s @ 10Hz * 2 (xy)
|
||||
self.score_head = nn.Linear(256, k_modes)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
def forward(self, agent_history, map_features):
|
||||
ctx = self.encoder(agent_history, map_features)
|
||||
trajs = self.mode_head(ctx).view(-1, self.k, 40, 2)
|
||||
scores = self.score_head(ctx).softmax(-1)
|
||||
return trajs, scores
|
||||
```
|
||||
|
||||
### MPC planner
|
||||
```python
|
||||
import casadi as ca
|
||||
|
||||
def mpc_plan(x0, ref_path, horizon=20, dt=0.1):
|
||||
opti = ca.Opti()
|
||||
x = opti.variable(4, horizon+1) # [x, y, theta, v]
|
||||
u = opti.variable(2, horizon) # [accel, steer]
|
||||
|
||||
opti.subject_to(x[:, 0] == x0)
|
||||
cost = 0
|
||||
for t in range(horizon):
|
||||
# Bicycle model
|
||||
nx = x[0, t] + x[3, t] * ca.cos(x[2, t]) * dt
|
||||
ny = x[1, t] + x[3, t] * ca.sin(x[2, t]) * dt
|
||||
nt = x[2, t] + x[3, t] / 2.5 * ca.tan(u[1, t]) * dt
|
||||
nv = x[3, t] + u[0, t] * dt
|
||||
opti.subject_to(x[:, t+1] == ca.vertcat(nx, ny, nt, nv))
|
||||
cost += ca.sumsqr(x[:2, t] - ref_path[:, t]) + 0.1 * ca.sumsqr(u[:, t])
|
||||
opti.minimize(cost)
|
||||
opti.subject_to(opti.bounded(-3, u[0, :], 3))
|
||||
opti.subject_to(opti.bounded(-0.5, u[1, :], 0.5))
|
||||
opti.solver("ipopt")
|
||||
sol = opti.solve()
|
||||
return sol.value(u[:, 0])
|
||||
```
|
||||
|
||||
### End-to-end policy (UniAD-style)
|
||||
```python
|
||||
class E2EDriving(nn.Module):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.bev_perception = BEVPerception()
|
||||
self.predictor = MultiModalPredictor()
|
||||
self.planner = nn.TransformerDecoder(...)
|
||||
|
||||
def forward(self, sensor_data, ego_state, command):
|
||||
bev = self.bev_perception(sensor_data)
|
||||
trajs = self.predictor(bev)
|
||||
plan = self.planner(query=ego_state, memory=torch.cat([bev, trajs]),
|
||||
tgt_mask=command_to_mask(command))
|
||||
return plan # 매 future ego trajectory
|
||||
```
|
||||
|
||||
### Sensor fusion (Kalman-like)
|
||||
```python
|
||||
class EKF:
|
||||
def predict(self, dt):
|
||||
F = build_motion_jacobian(self.state, dt)
|
||||
self.state = motion_model(self.state, dt)
|
||||
self.P = F @ self.P @ F.T + self.Q
|
||||
def update(self, z, H, R):
|
||||
y = z - H @ self.state
|
||||
S = H @ self.P @ H.T + R
|
||||
K = self.P @ H.T @ np.linalg.inv(S)
|
||||
self.state += K @ y
|
||||
self.P = (np.eye(len(self.state)) - K @ H) @ self.P
|
||||
```
|
||||
|
||||
### Safety: redundant trajectory check
|
||||
```python
|
||||
def safety_filter(planned_traj, predicted_agents, ttc_threshold=2.0):
|
||||
for agent_traj in predicted_agents:
|
||||
for t in range(len(planned_traj)):
|
||||
d = distance(planned_traj[t], agent_traj[t])
|
||||
v_rel = relative_velocity(planned_traj, agent_traj, t)
|
||||
ttc = d / max(v_rel, 0.1)
|
||||
if ttc < ttc_threshold:
|
||||
return emergency_brake_trajectory()
|
||||
return planned_traj
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Robotaxi L4 | 매 modular + HD map (Waymo pattern) |
|
||||
| Consumer ADAS | 매 vision-first E2E (Tesla FSD) |
|
||||
| Trucking highway | 매 modular + lidar (Aurora) |
|
||||
| Research SOTA | 매 E2E transformer (UniAD, GAIA-2) |
|
||||
| Safety case | 매 modular (interpretable) + ML perception |
|
||||
|
||||
**기본값**: 매 production deploy 면 modular stack with E2E modules; 매 R&D 면 full E2E + world model.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Robotics]] · [[Computer Vision]] · [[Reinforcement Learning]]
|
||||
- 변형: [[Modular AV Stack]] · [[End-to-End Driving]] · [[World Model Driving]]
|
||||
- 응용: [[Waymo]] · [[Tesla FSD]] · [[Wayve GAIA]]
|
||||
- Adjacent: [[BEV Perception]] · [[MPC]] · [[HD Maps]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 AV stack architecture decision, 매 perception/prediction/planning module design.
|
||||
**언제 X**: 매 ROS-level driver/firmware code (매 different domain), 매 hardware certification (ASIL-D).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **No safety driver during validation**: 매 fatal — 매 Uber 2018 case.
|
||||
- **Single point of failure**: 매 redundant sensors+compute 필수.
|
||||
- **HD map dependency only**: 매 fragile in new locations — 매 Tesla bet against, Waymo bets for.
|
||||
- **End-to-end without monitor**: 매 unverifiable — 매 always include shadow rule-based safety filter.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Waymo Safety Report 2023, Tesla AI Day 2022/2023, UniAD CVPR 2023).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — modular vs E2E, BEVFormer, MPC, safety filter |
|
||||
|
||||
Reference in New Issue
Block a user