Robot arm (source code)

= Robot arm

A <robot arm> is an articulated mechanism whose joints move an <end effector>, such as a gripper or tool, relative to a base. <Forward kinematics> maps joint coordinates to the tool's position and orientation; <inverse kinematics> asks which joint coordinates realize a desired tool configuration. The mechanism's <degrees of freedom> and joint limits constrain which configurations are reachable.<Modern Robotics: Mechanics, Planning, and Control by Kevin M. Lynch and Frank C. Park>[Chapter 4; author video supplement §4.1.1, open-chain forward kinematics]{ref}

For a planar arm with two rotating joints and link lengths $l_1,l_2$, let $\theta_1$ measure the first link's angle from the horizontal and $\theta_2$ the second link's angle relative to the first. Its tip satisfies
$$
x=l_1\cos\theta_1+l_2\cos(\theta_1+\theta_2),\qquad y=l_1\sin\theta_1+l_2\sin(\theta_1+\theta_2).
$$
With both lengths $1\,\mathrm m$, angles $(0,\pi/2)$ put the tip at $(1,1)\,\mathrm m$. Angles $(\pi/2,-\pi/2)$ reach the same position with a different arm shape and tool orientation. The example explains why <inverse kinematics> can have multiple solutions and why specifying position alone differs from specifying a full configuration.

In a physical experiment, joint encoders report angles while an external camera measures the tip. Comparing measured and predicted positions tests the geometric model; load-dependent deviations reveal flexibility or calibration errors that ideal <kinematics> omits. <Feedback control> then uses measured deviations to adjust the <actuators>.