"Robots are quite good at doing very specific tasks. Arguably, doing very specific tasks are what robots are best at. When you put a robot into an unknown situation, however, odds are you're not going to have a design that's optimized for whatever that situation ends up being. This is where modular robots come in handy, since they can reconfigure themselves on the fly to adapt their hardware to different tasks, and the Modular Robotics Lab at the University of Pennsylvania has come up with a wild new way of dynamically constructing robots based on their CKBot modules: spray foam.
The process starts with a "foam synthesizer cart" that deploys several CKBot clusters, each consisting of a trio of jointed CKBot modules. The CKBot clusters can move around by themselves, sort of, and combined with some helpful nudging from the cart, they can be put into whatever position necessary to form the joints of a robot. The overall structure of the robot is created with insulation foam that the cart sprays to connect the CKBot clusters in such a way as to create a quadruped robot, a snake robot, or whatever else you want."