Meet Snapbot: a modular legged robot that can be modified to emulate various styles of legged locomotion. It comes with yaw-pitch, roll-pitch, and roll-yaw-pitch legs. The body has a microcontroller and battery for untethered operation.
The legs can be attached or detached magnetically. The algorithm enables the robot to recognize configuration changes and select the locomotion method that matches the current one. This video from Disney shows the robot in action.
[Source]