Robotic Orchard Harvest: Multi-Arm Inverse Kinematics & Vision (2D)
2D orchard-harvest lab: real 2-link inverse kinematics (law of cosines) drives each picking arm, a greedy nearest-fruit scheduler assigns targets, and an occlusion-aware vision model decides whether each pick actually succeeds.
This 2D companion replaces the 3D original's decorative particle swirl with the actual robotics behind orchard harvesting: each picking arm is a genuine planar 2-link manipulator solved with textbook inverse kinematics (the law-of-cosines elbow solution plus the standard shoulder-angle identity), a greedy scheduler assigns the nearest unclaimed, reachable fruit to every free arm inside its rail window, and an occlusion-aware vision model — accuracy minus a canopy-depth penalty — decides whether each attempted pick actually succeeds. Drag the arm count, rail speed, reach, vision accuracy and canopy density and watch the pick rate, miss rate and crate-fill readouts respond to a real purity/throughput trade-off instead of a scripted animation.
Each arm solves r=√(dx²+dy²), theta2=acos((r²−L1²−L2²)/(2·L1·L2)), theta1=atan2(dy,dx)−atan2(L2·sinθ2, L1+L2·cosθ2) every frame against its currently assigned fruit, servos toward the solution at a fixed angular rate, then rolls a detection check with probability = vision accuracy − occlusion·0.8 once converged. Occlusion is generated per fruit from its radial depth inside the canopy disc at world-generation time (deterministic seeded RNG), so denser canopies genuinely raise the average miss rate rather than just adding sprites.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install