docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거

Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
Antigravity Agent
2026-07-05 00:33:48 +09:00
parent 1cfd3bbb56
commit 9148c358d0
6455 changed files with 1 additions and 86875 deletions
@@ -0,0 +1,241 @@
---
id: wiki-2026-0508-dynamic-environment-handling
title: Dynamic Environment Handling
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [dynamic environment, AV dynamic obstacles, MOT, scene flow, motion forecasting]
duplicate_of: none
source_trust_level: A
confidence_score: 0.92
verification_status: applied
tags: [autonomous-driving, robotics, perception, motion-forecasting, mot, dynamic-objects]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: Python / C++
framework: Apollo / Autoware / NuScenes
---
# Dynamic Environment Handling
## 매 한 줄
> **"매 static map 의 X — 매 moving object + 매 changing scene 의 reason"**. 매 autonomous driving 의 critical: 매 vehicle, pedestrian, cyclist, weather, occlusion. 매 modern: 매 transformer-based motion forecasting (Waymo MotionLM, Apollo).
## 매 핵심
### 매 problem
- **Static**: 매 building, lane.
- **Dynamic**: 매 vehicle, pedestrian, weather, occlusion.
- **Challenge**: 매 prediction + uncertainty.
### 매 pipeline
1. **Detection**: 매 3D bbox / pointcloud cluster.
2. **Tracking** (MOT): 매 ID 의 frame 의 maintain.
3. **Prediction**: 매 future trajectory.
4. **Planning**: 매 prediction 의 incorporate.
### 매 method
- **Detection**: PointPillars, CenterPoint, BEVFusion.
- **MOT**: SORT, DeepSORT, ByteTrack, JDE.
- **Prediction**: VectorNet, MTR, MotionLM, Wayformer.
- **Joint**: 매 perception + prediction unified.
### 매 modern AI
- **End-to-end**: 매 sensor → trajectory.
- **Transformer**: 매 multi-agent attention.
- **Diffusion forecasting**: 매 multi-modal future.
- **Foundation model**: 매 driving simulator (DriveGPT).
### 매 응용
1. **Autonomous driving**: 매 highway + urban.
2. **Robotics**: 매 mobile robot.
3. **Drone**: 매 obstacle avoid.
4. **AR**: 매 dynamic occlusion.
5. **Sports analytics**: 매 player tracking.
## 💻 패턴
### MOT (ByteTrack-style)
```python
class ByteTrack:
def __init__(self, high_thresh=0.5, low_thresh=0.1):
self.tracks = []
self.high = high_thresh
self.low = low_thresh
def update(self, detections):
# 매 1. high-conf 의 match (Hungarian + IoU)
high_dets = [d for d in detections if d.score > self.high]
matched_high, unmatched_tracks = match_iou(self.tracks, high_dets)
# 매 2. unmatched track + low-conf det 의 match (recover)
low_dets = [d for d in detections if self.low < d.score <= self.high]
matched_low, _ = match_iou(unmatched_tracks, low_dets)
# 매 3. update + new track
for t, d in matched_high + matched_low:
t.update(d)
for d in [d for d in high_dets if d not in matched]:
self.tracks.append(Track(d))
```
### Kalman filter (track state)
```python
class TrackKF:
def __init__(self, init_bbox):
# 매 state: [x, y, vx, vy, w, h]
self.x = np.array([*init_bbox.center, 0, 0, init_bbox.w, init_bbox.h])
self.P = np.eye(6) * 10
self.F = np.eye(6); self.F[0, 2] = self.F[1, 3] = 1 # 매 dt=1
self.H = np.eye(4, 6)
self.Q = np.eye(6) * 0.1
self.R = np.eye(4) * 1
def predict(self):
self.x = self.F @ self.x
self.P = self.F @ self.P @ self.F.T + self.Q
def update(self, measurement):
z = np.array([*measurement.center, measurement.w, measurement.h])
y = z - self.H @ self.x
S = self.H @ self.P @ self.H.T + self.R
K = self.P @ self.H.T @ np.linalg.inv(S)
self.x += K @ y
self.P = (np.eye(6) - K @ self.H) @ self.P
```
### Motion forecasting (Vector-style)
```python
class MotionPredictor(nn.Module):
"""매 simplified VectorNet."""
def __init__(self, hidden=64):
super().__init__()
self.poly_enc = nn.Linear(6, hidden) # 매 polyline encoder
self.attn = nn.MultiheadAttention(hidden, 4)
self.decoder = nn.Linear(hidden, 60) # 매 30 timesteps × (x,y)
def forward(self, polylines):
# 매 polylines: [B, N, T, 6] (x, y, vx, vy, type, idx)
B, N, T, _ = polylines.shape
feats = self.poly_enc(polylines).max(dim=2).values # 매 [B, N, hidden]
attn_out, _ = self.attn(feats, feats, feats)
ego_feat = attn_out[:, 0] # 매 ego 의 first
return self.decoder(ego_feat).reshape(B, 30, 2)
```
### Multi-modal prediction (Gaussian mixture)
```python
class MultiModalPredictor(nn.Module):
def __init__(self, K=6, T=30):
super().__init__()
self.K = K
self.head_mean = nn.Linear(64, K * T * 2)
self.head_var = nn.Linear(64, K * T * 2)
self.head_pi = nn.Linear(64, K)
def forward(self, feat):
means = self.head_mean(feat).reshape(-1, self.K, 30, 2)
vars = self.head_var(feat).exp().reshape(-1, self.K, 30, 2)
pi = self.head_pi(feat).softmax(-1)
return means, vars, pi
```
### Risk-aware planning
```python
def safe_speed(predicted_trajectories, ego_path, dt=0.1):
"""매 prediction 의 risk 의 minimum 의 follow."""
min_safe_v = float('inf')
for t in range(30):
for traj in predicted_trajectories:
if intersects(ego_path[t], traj[t], radius=2.0):
tt = t * dt
if tt > 0:
min_safe_v = min(min_safe_v, ego_path[t].dist / tt)
return min_safe_v
```
### Occlusion handling
```python
def handle_occlusion(tracks, current_dets, max_age=10):
for t in tracks:
if not t.matched:
t.age += 1
if t.age > max_age:
t.delete()
else:
# 매 predict-only mode
t.kf.predict()
t.is_visible = False
return [t for t in tracks if not t.deleted]
```
### Weather degradation handling
```python
def adapt_to_weather(sensor_data, weather):
if weather == 'rain':
# 매 lidar noise ↑ → 매 detection threshold ↑
return {'detection_threshold': 0.7, 'fusion_weight_camera': 0.3}
elif weather == 'fog':
# 매 camera 의 unreliable
return {'detection_threshold': 0.6, 'fusion_weight_camera': 0.1}
return {'detection_threshold': 0.5, 'fusion_weight_camera': 0.5}
```
### CARLA simulation (test rig)
```python
import carla
client = carla.Client('localhost', 2000)
world = client.get_world()
settings = world.get_settings()
settings.synchronous_mode = True
settings.fixed_delta_seconds = 0.05
world.apply_settings(settings)
# 매 spawn dynamic actors
for spawn_point in world.get_map().get_spawn_points()[:50]:
bp = world.get_blueprint_library().find('vehicle.tesla.model3')
actor = world.try_spawn_actor(bp, spawn_point)
if actor: actor.set_autopilot(True)
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Highway | Long-horizon (5s) prediction |
| Urban | Multi-agent + intent |
| Pedestrian | Short-horizon, multi-modal |
| Heavy occlusion | Long max_age, predict-only |
| Adverse weather | Sensor fusion reweight |
| Real-time | <100ms latency budget |
**기본값**: 매 BEV detection + ByteTrack + transformer multi-modal predict + risk-aware plan.
## 🔗 Graph
- 부모: [[Autonomous-Driving]]
- 변형: [[Motion-Forecasting]]
- 응용: [[Apollo]]
- Adjacent: [[End-to-End-Driving]]
## 🤖 LLM 활용
**언제**: 매 AV planning. 매 robot mobile. 매 dynamic scene.
**언제 X**: 매 static map only. 매 stationary robot.
## ❌ 안티패턴
- **Single-modal predict**: 매 future 의 multi modes 의 ignore.
- **Track without filter**: 매 noise.
- **Fixed weather config**: 매 degradation 의 adapt X.
- **Detection without ID**: 매 association 의 lose.
- **No occlusion handling**: 매 ghost track.
## 🧪 검증 / 중복
- Verified (NuScenes, Waymo Open, MOTChallenge).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-04-20 | Auto-reinforced |
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — MOT + prediction + 매 ByteTrack / KF / VectorNet / risk plan code |