[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
+270 -41
View File
@@ -1,63 +1,292 @@
---
id: wiki-2026-0508-automated-mapping
title: Automated Mapping
title: Automated Mapping (SLAM / HD Map)
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AI-004]
aliases: [자동 매핑, SLAM, HD map, point cloud, bundle adjustment, loop closure, 3D reconstruction, NeRF]
duplicate_of: none
source_trust_level: A
confidence_score: 0.91
tags: [ai, slam, mapping, autonomous]
confidence_score: 0.9
verification_status: applied
tags: [slam, hd-map, lidar, point-cloud, bundle-adjustment, loop-closure, robotics, autonomous-vehicles, nerf, 3d-reconstruction]
raw_sources: []
last_reinforced: 2026-04-20
github_commit: batch-reinforce-05
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: C++ / Python
framework: ROS / Open3D / COLMAP / OpenVSLAM
---
# [[Automated_Mapping|Automated Mapping]] & SLAM
# Automated Mapping
## 📌 한 줄 통찰 (The Karpathy Summary)
> 미지의 공간을 탐사함과 동시에 자신의 위치를 파악하여 정밀한 지도를 그려내는 자율 주행의 눈과 지능.
## 📌 한 줄 통찰
> **"매 unknown 의 explore + 매 self-localize 의 simultaneous"**. 매 SLAM (Simultaneous Localization and Mapping). 매 sensor (LiDAR, camera, IMU) 의 fusion. 매 robotics / AV / AR / VR 의 spatial intelligence 의 base. 매 modern: 매 NeRF / Gaussian Splatting 의 photoreal map.
## 📖 구조화된 지식 (Synthesized Content)
- **추출된 패턴:** LiDAR/카메라 데이터 퓨전을 통해 특징을 추출하고, 루프 폐쇄(Loop Closure)를 통해 지도 정합의 오차를 보정하며 전역 일관성을 확보하는 패턴.
- **세부 내용:**
- 4단계 매핑 파이프라인: 데이터 획득 -> 특징 추출 -> 위상 구조 생성 -> 전역 최적화.
- 번들 조정(Bundle Adjustment)을 통한 그래프 기반 최적화 기법 적용.
- 고정밀(HD) 지도 자동 생성 및 실시간 업데이트 로직.
## 📖 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- **과거 데이터와의 충돌:** 수동 지도 제작 방식에서 센서 기반의 완전 자율 매핑 시스템으로의 패러다임 변화.
- **정책 변화:** 지식 구조(w2) 관점에서 자율 주행 에이전트의 '공간 지능' 핵심 요소로 정의.
### 매 SLAM 의 4 stage
1. **Sensor data**: LiDAR / camera / IMU / GPS.
2. **Feature extraction**: ORB, SIFT, SuperPoint, LoFTR.
3. **Pose + map estimation**: 매 EKF / particle filter / graph.
4. **Loop closure + global optimization**: 매 bundle adjustment.
## 🔗 지식 연결 (Graph)
- **Parent:** 10_Wiki/💡 Topics/AI
- **Related:** [[Computer_Vision|Computer_Vision]], [[VPS_NeRF|VPS_NeRF]], Spatial-Computing
- **Raw Source:** 00_Raw/2026-04-20/[[Automated-Map-Generation|Automated-Map-Generation]].md
### 매 SLAM type
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
#### Visual SLAM
- 매 camera only.
- 매 ORB-SLAM3 (state-of-the-art classic).
- 매 DROID-SLAM (deep learning).
**언제 이 지식을 쓰는가:**
- *(TODO)*
#### LiDAR SLAM
- 매 point cloud.
- 매 LOAM, LeGO-LOAM, FAST-LIO.
- 매 sparse + accurate.
**언제 쓰면 안 되는가:**
- *(TODO)*
#### Visual-Inertial (VIO)
- 매 camera + IMU.
- 매 VINS-Fusion, OpenVINS.
- 매 robotics, AR/VR.
## 🧪 검증 상태 (Validation)
#### LiDAR-Visual-Inertial
- 매 multi-sensor fusion.
- 매 LIO-SAM, FAST-LIVO.
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
### 매 핵심 component
## 🧬 중복 검사 (Duplicate Check)
#### Front-end
- 매 feature extraction.
- 매 matching (RANSAC).
- 매 motion estimation.
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
#### Back-end
- 매 graph optimization.
- 매 g2o, Ceres, GTSAM.
- 매 nonlinear least squares.
## 🕓 변경 이력 (Changelog)
#### Loop closure
- 매 same place revisit 의 detect.
- 매 DBoW2, NetVLAD.
- 매 drift 의 correct.
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
#### Mapping
- 매 occupancy grid (2D).
- 매 OctoMap (3D voxel).
- 매 mesh / point cloud.
### Bundle Adjustment (BA)
- 매 nonlinear optimization.
- 매 reprojection error 의 minimize.
- 매 camera pose + 3D point 의 동시 추정.
- 매 SLAM 의 backbone.
### Modern / deep learning
- **DROID-SLAM**: 매 differentiable.
- **NeRF** (Neural Radiance Field): 매 photorealistic 3D.
- **Gaussian Splatting** (3DGS, 2023): 매 fast NeRF alternative.
- **NICE-SLAM**: 매 dense neural SLAM.
- **Gaussian-SLAM**.
### HD Map (autonomous driving)
- 매 lane geometry.
- 매 traffic sign / signal.
- 매 routing graph.
- 매 cm-level accuracy.
- 매 update mechanism.
### 매 응용
1. **Autonomous vehicle**: HD map.
2. **Drone**: indoor + outdoor.
3. **AR / VR**: room understanding (ARKit, ARCore).
4. **Robot vacuum**: 매 home map.
5. **Indoor robot**: 매 warehouse, 매 hospital.
6. **Surveying**: 매 building, 매 mine.
7. **Underwater**: 매 sonar + visual.
8. **Photogrammetry**: 매 cultural heritage.
### 매 challenge
1. **Dynamic objects**: 매 person, vehicle.
2. **Featureless environment**: 매 white wall.
3. **Lighting**: 매 dark / bright extremes.
4. **Long-term map**: 매 changing environment.
5. **Scale ambiguity** (monocular): 매 metric scale.
6. **Computational cost**: 매 real-time.
## 💻 패턴
### ORB-SLAM3 (C++)
```bash
# 매 build
mkdir build && cd build && cmake .. && make -j8
# 매 run with EuRoC dataset (visual-inertial)
./Examples/Stereo-Inertial/stereo_inertial_euroc \
Vocabulary/ORBvoc.txt \
Examples/Stereo-Inertial/EuRoC.yaml \
/path/to/V1_01_easy \
Examples/Stereo-Inertial/EuRoC_TimeStamps/V101.txt
```
### Python visual SLAM (pyslam-style)
```python
import cv2
import numpy as np
class SimpleVO:
def __init__(self, K):
self.K = K # 매 camera intrinsic
self.orb = cv2.ORB_create(2000)
self.matcher = cv2.BFMatcher(cv2.NORM_HAMMING)
self.prev_kp, self.prev_des = None, None
self.pose = np.eye(4)
def process(self, frame):
kp, des = self.orb.detectAndCompute(frame, None)
if self.prev_des is None:
self.prev_kp, self.prev_des = kp, des
return self.pose
matches = self.matcher.match(self.prev_des, des)
matches = sorted(matches, key=lambda x: x.distance)[:200]
pts1 = np.array([self.prev_kp[m.queryIdx].pt for m in matches])
pts2 = np.array([kp[m.trainIdx].pt for m in matches])
E, mask = cv2.findEssentialMat(pts1, pts2, self.K, cv2.RANSAC, 0.999, 1.0)
_, R, t, _ = cv2.recoverPose(E, pts1, pts2, self.K, mask=mask)
T = np.eye(4)
T[:3, :3] = R
T[:3, 3:] = t
self.pose = self.pose @ T
self.prev_kp, self.prev_des = kp, des
return self.pose
```
### Open3D (point cloud)
```python
import open3d as o3d
# 매 load + visualize
pcd = o3d.io.read_point_cloud('scan.ply')
o3d.visualization.draw_geometries([pcd])
# 매 ICP registration
source = o3d.io.read_point_cloud('scan1.ply')
target = o3d.io.read_point_cloud('scan2.ply')
result = o3d.pipelines.registration.registration_icp(
source, target,
max_correspondence_distance=0.5,
estimation_method=o3d.pipelines.registration.TransformationEstimationPointToPoint(),
)
print(result.transformation)
```
### COLMAP (photogrammetry)
```bash
# 매 image set → 매 3D reconstruction
colmap automatic_reconstructor \
--workspace_path /path/to/workspace \
--image_path /path/to/images
```
### NeRF (instant-NGP)
```python
import tinycudann as tcnn
import torch
# 매 hash grid encoding (instant-NGP)
encoder = tcnn.Encoding(n_input_dims=3, encoding_config={
'otype': 'HashGrid',
'n_levels': 16,
'n_features_per_level': 2,
'log2_hashmap_size': 19,
'base_resolution': 16,
'per_level_scale': 1.5,
})
mlp = tcnn.Network(n_input_dims=encoder.n_output_dims, n_output_dims=4, network_config={
'otype': 'FullyFusedMLP', 'activation': 'ReLU',
'output_activation': 'None', 'n_neurons': 64, 'n_hidden_layers': 2,
})
def render(rays_o, rays_d):
samples = sample_along_rays(rays_o, rays_d)
encoded = encoder(samples)
rgb_sigma = mlp(encoded)
return volume_render(rgb_sigma, samples)
```
### Gaussian Splatting (3DGS, 2023)
```bash
# 매 SfM 의 result 의 import
python train.py -s /path/to/colmap-output -m /path/to/output
# 매 view interactive
./SIBR_remoteGaussian_app -m /path/to/output
```
### Loop closure (DBoW3)
```cpp
#include <DBoW3/DBoW3.h>
DBoW3::Vocabulary vocab("ORBvoc.bin");
DBoW3::Database db(vocab, false, 0);
// 매 keyframe 마다 add
DBoW3::BowVector bow;
vocab.transform(descriptors, bow);
db.add(bow);
// 매 query: 매 매 frame 의 lookup
DBoW3::QueryResults ret;
db.query(bow, ret, 5);
if (ret[0].Score > 0.7) {
// 매 loop closure detected!
}
```
## 🤔 결정 기준
| 상황 | Approach |
|---|---|
| Indoor robot | Visual-Inertial (ORB-SLAM3) |
| Outdoor AV | LiDAR + camera + IMU + GPS |
| AR (mobile) | ARKit / ARCore |
| Photoreal 3D | Gaussian Splatting |
| Photogrammetry | COLMAP |
| Drone outdoor | VIO + GPS |
| Robot vacuum | LiDAR 2D SLAM |
| Photoreal AR | NeRF / 3DGS |
**기본값**: Visual SLAM = ORB-SLAM3. LiDAR = LIO-SAM. Photoreal = Gaussian Splatting.
## 🔗 Graph
- 부모: [[Robotics]] · [[Computer-Vision]] · [[Spatial-Computing]]
- 변형: [[Visual-SLAM]] · [[LiDAR-SLAM]] · [[VIO]] · [[Visual-Inertial-SLAM]]
- 응용: [[Autonomous-Vehicles]] · [[AR-VR]] · [[Drone]] · [[HD-Map]] · [[Photogrammetry]]
- Modern: [[NeRF]] · [[Gaussian-Splatting]] · [[DROID-SLAM]] · [[NICE-SLAM]]
- Adjacent: [[Bundle-Adjustment]] · [[Loop-Closure]] · [[Bayesian-Brain-Hypothesis]]
## 🤖 LLM 활용
**언제**: 매 robot navigation. 매 AR/VR system. 매 3D reconstruction. 매 AV mapping.
**언제 X**: 매 2D image processing only. 매 single static image (use SfM).
## ❌ 안티패턴
- **Pure visual outdoor (no IMU)**: 매 fast motion 의 lose.
- **No loop closure**: 매 drift 폭발.
- **Static map assumption** (urban): 매 dynamic obj 의 noise.
- **Featureless environment**: 매 SLAM fail (LiDAR 의 fall back).
- **Offline only**: 매 real-time latency 의 ignore.
- **No relocalization**: 매 lost 시 의 recovery X.
## 🧪 검증 / 중복
- Verified (ORB-SLAM3, FAST-LIO, NeRF, 3DGS papers).
- 신뢰도 A.
- Related: [[Autonomous-Vehicles]] · [[Computer-Vision]] · [[Robotics]] · [[NeRF]] · [[Gaussian-Splatting]].
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — SLAM type + ORB-SLAM3 + Open3D + NeRF + 3DGS code |