Design a Configurable Robot Arm
Model a serial robot arm whose bounded joints, pose queries, and terminal gripper can evolve behind stable command contracts.
For this exercise, assume a planar serial robot arm has one fixed base, an ordered chain of positive-length rigid segments joined by independently bounded rotational joints, and one gripper at the free end. Each joint has a stable ID, inclusive minimum and maximum angles, and a current angle.
A client configures one valid arm, atomically rotates one or several joints, opens or closes the gripper, and reads an immutable state snapshot with the end-effector pose. An invalid command leaves all state unchanged.
A same-operation-ID retry with identical intent returns the original result; reusing that ID with changed intent is rejected. The public API should accommodate future joint types and motion constraints without requiring existing clients to change.
Design the object model, public contracts, command interactions, validation, state ownership, and extension boundaries. Hardware I/O, collision detection, path planning, inverse kinematics, persistence, and distributed control are outside scope.