[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
@@ -1,63 +1,202 @@
---
id: wiki-2026-0508-denavit-hartenberg-parameters
title: Denavit Hartenberg Parameters
title: Denavit-Hartenberg Parameters
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: [P-Reinforce-AI-DH-PARAMS]
aliases: [DH parameters, DH convention, robot kinematics, link parameters]
duplicate_of: none
source_trust_level: A
confidence_score: 0.93
tags: ["Robotics|[Robotics", Kinematics, Mathematics, DH]
verification_status: applied
tags: [robotics, kinematics, dh-parameters, mathematics, transformation-matrix]
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: Python / Robotics
framework: ROS / PyBullet / MoveIt
---
# Denavit-Hartenberg-Parameters (D-H 파라미터)
# Denavit-Hartenberg Parameters
## 📌 한 줄 통찰 (The Karpathy Summary)
> "복잡한 관절 로봇을 단 4개의 숫자로 요약하는 기술." 로봇 팔의 각 링크와 관절 사이의 기하학적 관계를 표준화된 방식으로 표현하여 로봇의 움직임을 선형 대수학으로 계산하게 해주는 도구다.
## 한 줄
> **"매 robot link 의 4 parameter 의 standard description"**. 매 robot manipulator 의 forward kinematics. 매 (a, α, d, θ) 의 의 매 link 의 transformation. 매 modern variant: 매 modified DH (Craig).
## 📖 구조화된 지식 (Synthesized Content)
- **The Four Parameters**:
- **$\theta$ (Joint [[ANGLE|ANGLE]])**: Z축 기준 회전각.
- **$d$ (Link offset)**: Z축 방향의 거리.
- **$a$ (Link length)**: 공통 법선(Common normal)의 길이.
- **$\alpha$ (Link twist)**: 공통 법선 기준 Z축 간의 회전각.
- **Function**: 이 4개 수치를 행렬식에 넣으면 로봇 팔 끝단(End-effector)의 위치와 방향을 정밀하게 계산하는 **Forward Kinematics**가 완성된다.
- **Standardization**: 어떤 복잡한 로봇이라도 이 규칙만 따르면 일관된 수학적 모델링이 가능하다.
## 매 핵심
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
- D-H 파라미터는 강력하지만 관절 축이 평행한 경우 불연속성이 발생하는 등 예외 케이스 제약이 있다. 이를 보완하기 위해 'Modified D-H'나 'Exponential Map' 방식 등이 현대 로보틱스 제어에서 병행 사용된다.
### 매 4 parameter (classical Denavit-Hartenberg)
- **a** (link length): 매 z_{i-1} → z_i 의 X-axis 의 distance.
- **α** (link twist): 매 z_{i-1} → z_i 의 angle.
- **d** (link offset): 매 x_{i-1} → x_i 의 z-axis 의 distance.
- **θ** (joint angle): 매 x_{i-1} → x_i 의 z-axis 의 rotation.
## 🔗 지식 연결 (Graph)
- Related: [[Degrees-of-Freedom|Degrees-of-Freedom]] , Kinematics
- Level: Robotics-Engineering
### 매 transformation matrix
```
T_i = Rot_z(θ) * Trans_z(d) * Trans_x(a) * Rot_x(α)
```
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 forward kinematics
- 매 each link 의 T_i 의 multiply.
- 매 base → end-effector 의 pose.
**언제 이 지식을 쓰는가:**
- *(TODO)*
### 매 modified DH (Craig)
- 매 frame 의 link's proximal end 의 attach.
- 매 less ambiguity.
**언제 쓰면 안 되는가:**
- *(TODO)*
### 매 응용
1. **Manipulator**: 매 6-DOF arm.
2. **Mobile robot**: 매 articulated.
3. **Surgical robot**: 매 da Vinci.
4. **Animation**: 매 IK.
5. **Drone arm**: 매 aerial manipulation.
## 🧪 검증 상태 (Validation)
## 💻 패턴
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
### Forward kinematics (Python)
```python
import numpy as np
## 🧬 중복 검사 (Duplicate Check)
def dh_matrix(a, alpha, d, theta):
ca, sa = np.cos(alpha), np.sin(alpha)
ct, st = np.cos(theta), np.sin(theta)
return np.array([
[ct, -st*ca, st*sa, a*ct],
[st, ct*ca, -ct*sa, a*st],
[0, sa, ca, d],
[0, 0, 0, 1],
])
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
def forward_kinematics(dh_table, joint_angles):
"""dh_table: [(a, alpha, d, theta_offset), ...]"""
T = np.eye(4)
for (a, alpha, d, off), q in zip(dh_table, joint_angles):
T = T @ dh_matrix(a, alpha, d, off + q)
return T
## 🕓 변경 이력 (Changelog)
# 매 example: PUMA 560
puma = [
(0, np.pi/2, 0, 0),
(0.4318, 0, 0, 0),
(0.0203, -np.pi/2, 0.15, 0),
(0, np.pi/2, 0.4318, 0),
(0, -np.pi/2, 0, 0),
(0, 0, 0, 0),
]
T = forward_kinematics(puma, [0, np.pi/4, -np.pi/4, 0, np.pi/2, 0])
print(T[:3, 3]) # 매 end-effector position
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
### Inverse kinematics (numerical Jacobian)
```python
def jacobian(dh_table, q, eps=1e-6):
n = len(q)
p0 = forward_kinematics(dh_table, q)[:3, 3]
J = np.zeros((3, n))
for i in range(n):
q1 = q.copy(); q1[i] += eps
p1 = forward_kinematics(dh_table, q1)[:3, 3]
J[:, i] = (p1 - p0) / eps
return J
def ik_newton(dh_table, target, q0, max_iter=100, tol=1e-4):
q = q0.copy()
for _ in range(max_iter):
p = forward_kinematics(dh_table, q)[:3, 3]
err = target - p
if np.linalg.norm(err) < tol: break
J = jacobian(dh_table, q)
dq = np.linalg.pinv(J) @ err
q += dq
return q
```
### URDF integration
```python
# URDF 의 DH 의 convert
import xml.etree.ElementTree as ET
def urdf_to_dh(urdf_path):
"""매 URDF joint 의 DH-style approx."""
tree = ET.parse(urdf_path)
dh = []
for joint in tree.findall('joint'):
if joint.attrib['type'] == 'revolute':
origin = joint.find('origin')
xyz = [float(x) for x in origin.attrib['xyz'].split()]
rpy = [float(x) for x in origin.attrib['rpy'].split()]
# 매 simplification — true DH extraction 의 nontrivial
dh.append((xyz[0], rpy[0], xyz[2], 0))
return dh
```
### Workspace visualization
```python
def workspace_sample(dh_table, joint_limits, n=5000):
points = []
for _ in range(n):
q = [np.random.uniform(lo, hi) for lo, hi in joint_limits]
p = forward_kinematics(dh_table, q)[:3, 3]
points.append(p)
return np.array(points)
# 매 plot
import matplotlib.pyplot as plt
pts = workspace_sample(puma, [(-np.pi, np.pi)] * 6)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(pts[:, 0], pts[:, 1], pts[:, 2], s=1)
```
### Modified DH (Craig)
```python
def mdh_matrix(a, alpha, d, theta):
"""매 frame at proximal end."""
ca, sa = np.cos(alpha), np.sin(alpha)
ct, st = np.cos(theta), np.sin(theta)
return np.array([
[ct, -st, 0, a],
[st*ca, ct*ca, -sa, -d*sa],
[st*sa, ct*sa, ca, d*ca],
[0, 0, 0, 1],
])
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Standard manipulator | Classical DH |
| Avoiding singularity | Modified DH (Craig) |
| Modern simulation | URDF (rich features) |
| Closed-form IK | Pieper's solution (last 3 axes intersect) |
| Numerical IK | Jacobian-based |
| Beyond serial (parallel) | Stewart platform — DH X |
**기본값**: 매 manipulator 의 DH + 매 forward kinematics + 매 numerical IK + 매 URDF for sim.
## 🔗 Graph
- 부모: [[Robotics]] · [[Kinematics]]
- 변형: [[Modified-DH]] · [[Forward-Kinematics]] · [[Inverse-Kinematics]]
- 응용: [[Manipulator]] · [[ROS]] · [[MoveIt]]
- Adjacent: [[Degrees-of-Freedom]] · [[Jacobian]] · [[URDF]]
## 🤖 LLM 활용
**언제**: 매 robot manipulator design. 매 kinematics derivation. 매 sim setup.
**언제 X**: 매 parallel mechanism. 매 soft robot.
## ❌ 안티패턴
- **Confuse classical / modified**: 매 transform 의 wrong.
- **Ignore singularity**: 매 wrist 의 gimbal lock.
- **No joint limit**: 매 unreachable.
- **Pure forward 의 trust**: 매 IK 의 non-unique.
## 🧪 검증 / 중복
- Verified (Spong/Hutchinson/Vidyasagar Robot Dynamics).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-04-20 | Auto-reinforced |
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — DH parameter + 매 forward / IK / URDF / modified DH code |