Engineers and even the U.S. military have been seeking shape-shifting robots that can squeeze into tight spaces, such as cracks under doors in a disaster zone or between delicate parts of a human body on the operating table.

In the latest development of soft robotics, researchers at MIT report they've created — using materials that can be found at a craft store — a new kind of robot muscle that goes soft when heated and hardens when cooled.

The engineers had been working on the raw material for a soft robot as part of the ChemBots program at the Defense Advanced Research Projects Agency (DARPA), the branch of the Pentagon responsible for experimenting with new military tech. DARPA is interested in developing squishy robots capable of deforming their bodies, much like an octopus. [The 6 Strangest Robots Ever Created]

But octopuses also have the ability to stiffen segments of their arms, making elbow-like joints that make it easier for them to pick up things like food on the seafloor. To exert force on other objects, soft robots, too, would need to be able to harden parts of their body.

"You can't just create a bowl of Jell-O, because if the Jell-O has to manipulate an object, it would simply deform without applying significant pressure to the thing it was trying to move," Anette Hosoi, a professor of mechanical engineering and applied mathematics at MIT, said in a statement.

Hosoi's solution was to create a material made from wax and foam that can switch between rigid and squishy states. Hosoi and her colleagues simply put a lattice of polyurethane foam in a bath of melted wax. Wires that apply a current to heat the foam are used to control the material's temperature, the researchers said. Turning on the current melts the wax and makes the robot muscle go soft; turning the current off allows the material to cool and go back to its hardened state.

Stronger material, such as metal solder, could replace the wax coating in future iterations of the material, Hosoi said. She is currently looking at other possible robot materials such as magnetorheological fluids and electrorheological fluids, which can change from liquid to solid when a magnetic field or electrical current is applied. 

The new material was described June 30 in the journal Macromolecular Materials and Engineering.

Follow Megan Gannon on Twitter and Google+. Follow us @livescienceFacebook Google+. Original article on Live Science.