The arm's 3-DOF end effector is driven by a PD (proportional-derivative) feedback controller — the same principle behind almost every industrial robot joint. At every simulation step the controller measures the position error between the end effector and its current target (a box on the conveyor or a drop point), and computes a corrective acceleration proportional to that error and its rate of change.
e(t) = target - position
a(t) = Kp · e(t) - Kd · velocity
θ_i = inverse_kinematics(position + a·dt²)
The resulting acceleration is integrated into velocity and position, then converted into 3 joint angles via a simple analytic inverse-kinematics solve (planar 2-link arm + base yaw), which is what actually rotates the visible robot segments.
- Kp — proportional gain: how aggressively the arm corrects toward the target. Too low and it lags forever; too high and it overshoots and oscillates.
- Kd — derivative damping: resists velocity to prevent oscillation/overshoot, trading speed for stability.
- Conveyor speed — how fast objects move under the arm, raising the tracking difficulty and required torque.
- Step response mode freezes the conveyor and sends the arm to a fixed setpoint so you can see classic control-theory overshoot/settling behaviour directly.
This is the core loop behind pick-and-place robots, CNC servo axes, and drone stabilization: sense error → compute correction → actuate → repeat, closing the loop many times per second.