The University of Pennsylvania’s Modlab roboticists have built a Foambot, which is a robot that can build itself using spray-on foam! That’s right - and it can also use the foam and modular parts to repair other robots (and itself).
The Foambot sprays its parts, which consist of a basic wheeled cart and several jointed modules, with self-hardening insulating foam to connect them together. The actuators and microcontrollers that make up the robot are pre-assembled in clusters, each with a magnetic attachment face on the end. Because of their modularity, they’re able to be configured in a variety of ways depending upon the tasks at hand.
The purpose of this robot is to have a modular robot that is able to deal with unknown circumstances, such as disaster recovery, intelligence gathering, troop support, and planetary exploration. Using foam is a particularly cheap and efficient way of doing this.
Check out the video of the Foambot making a quadruped robot.