⌘ planar-arm v0.4Skipper Chen / robotics

ROBOTICS / KINEMATICS

3D arm simulator

A three-axis SCARA-style robot with vertical motion and pick-and-place.

MODEL2R + 1P · SCARAXYZ positioning · parallel-jaw gripper
WORKSPACEPERSPECTIVE 3D
Drag to orbit · scroll to zoom · right-drag to pan
Click a block or floor position to set an XY target
Link 1 Link 2 Reach envelope
END EFFECTOR · X0.0 mm
END EFFECTOR · Y0.0 mm
TOOL HEIGHT · Z100 mm
TARGET ERROR— mm

DOCUMENTATION

Robot model

Two revolute joints position the wrist in XY, and a prismatic tool axis sets grip height from 12–100 mm. Blocks are 24 mm cubes. Close the jaws within 8 mm horizontally and 6 mm vertically to attach a block; opening releases it under gravity.

Simplified grasp and gravity model. No motor dynamics, friction, robot/object collision checks, or block stacking.

Elbow negative

FORWARD KINEMATICS

Joint space → Cartesian space

Set the shoulder and elbow angles. The arm computes where the end effector lands by adding the two link vectors.

x = L₁ cos θ₁ + L₂ cos(θ₁ + θ₂)
y = L₁ sin θ₁ + L₂ sin(θ₁ + θ₂)
INVERSE KINEMATICS

Cartesian space → joint space

Choose a destination. The law of cosines solves the elbow angle, then the shoulder rotates the arm toward the target. Most reachable points have two solutions.

|L₁ − L₂| ≤ √(x² + y²) ≤ L₁ + L₂
θ₂ is relative to the upper arm. Angles increase counterclockwise.
References & implementation notes

Structure and documentation references: Robotics Toolbox for Python and Mithi’s Hexapod simulator. 3D rendering uses Three.js and OrbitControls (MIT license included). This is a separate implementation, not a port of either robotics project. Initial implementation created with Codex assistance; see the project README for scope and learning notes.