二連桿逆運動學計算器

2-Link Inverse Kinematics Calculator

Input target (x, y) coordinates, solve for two joint angles θ₁, θ₂ and determine whether the target is within the reachable workspace, for robot-arm path planning.

📐 計算公式
θ₂ = acos((x²+y²−L₁²−L₂²)/(2L₁L₂))

平面二連桿逆解,含可達性判定。

📌 計算說明
  • cosθ₂=(r²−L₁²−L₂²)/(2L₁L₂)。
  • |L₁−L₂| ≤ √(x²+y²) ≤ L₁+L₂ 才可解。

📚 深度解析:二連桿逆運動學

💡 常見使用場景

目標 (1.3,1.2)、臂各 1m
r²=1.3²+1.2²=3.13;cosθ2=(3.13−2)/(2×1×1)=0.565 → θ2≈55.6°,可解且在工作空間內。
超出 r_max
r>2m 則無解,目標不可達需重規劃。

❓ 常見問題(FAQ)

cosθ2>1?
說明目標超出可達半徑,逆解不存在。
幾個解?
平面內二連桿通常肘上/肘下兩解,按約束選。