ArmStudio models a planar serial manipulator (2R or 3R) mounted on a pedestal, and connects the three views a
robotics engineer reasons in: task space, joint space and configuration space.
Forward kinematics
x = x₀ + Σᵢ Lᵢ·cos(θ₁ + … + θᵢ)
y = y₀ + Σᵢ Lᵢ·sin(θ₁ + … + θᵢ) φ = θ₁ + … + θₙ
Inverse kinematics
Closed form (2R): the law of cosines gives two branches (elbow up / down):
cos θ₂ = (dx² + dy² − L₁² − L₂²) / (2 L₁ L₂)
θ₁ = atan2(dy, dx) − atan2(L₂ sin θ₂, L₁ + L₂ cos θ₂)
For 3R with a fixed tool angle φ the wrist point is solved first. With φ free the arm is redundant;
drag mode then uses damped least squares, which stays well-behaved near singularities:
Δθ = Jᵀ (J Jᵀ + λ² I)⁻¹ · e
Manipulability & statics
Yoshikawa’s index w = √det(J Jᵀ) measures how freely the tool can move; its ellipse (drawn at the tool) is
the image of unit joint speeds. w → 0 at singularities (arm fully stretched or folded). The background map shows,
for every reachable point, the best collision-free w. Holding torques follow from τ = Jᵀ F summed over link weights and the payload.
Configuration space
Every arm pose is a single point (θ₁, θ₂). Each workspace obstacle is mapped — by exhaustive collision checking of the
link capsules — into a C-space obstacle drawn in the same colour. Moving a physical box reshapes its C-space
image in real time. For the 3R arm the view is a slice at the current θ₃.
Motion planning
- The goal pose is chosen among all IK solutions (both elbow branches and, for 3R, 72 tool angles) that are collision-free and closest to the current pose.
- A* searches an 8-connected 180×180 grid (2R) or a 26-connected 72³ lattice (3R) with lazy collision checks.
- The cell path is shortcut-smoothed (straight joint-space segments verified every 1°).
- A quintic time scaling s(τ) = 10τ³ − 15τ⁴ + 6τ⁵ gives zero velocity and acceleration at both ends.
Things to try
- Drag the dot in C-space straight into a coloured blob and watch the matching link turn red.
- Stretch the arm fully in IK mode: the ellipse collapses to a line (singularity).
- Draw a figure-eight in Draw mode: the arm acts as a plotter using continuous IK.
- Move an obstacle between the arm and a target, then plan again.