Running headfirst into a wall isn't normally a good thing, but it seems to work out well for cockroaches.

A study published in the Journal of the Royal Society Interface found that these insects run that way into walls in order to bounce their bodies into an angle. That enables them to then crawl up a vertical surface with nary a problem.

It's a crafty escape maneuver that scientists think will help them develop better robots.

Up on the wall

The American cockroach is fast, moving at a rate of 50 body lengths per second. When racing across the floor to avoid a predator, a cockroach may aim for a wall and take it headfirst. Such a collision should stun the bug, but they have a shock-absorbent body that not only protects them from damage, it also allows them to channel that momentum into actually crawling up the wall.

Researchers sent 18 male cockroaches running on a paper-lined surface that ended in a wall. They filmed them with high-speed video at a rate of 500 frames per second and some motion tracking software to see how the bugs made it up the wall. Both of these were important because, to the naked eye, the roaches appear to scurry up the wall without missing a step. They just appear to effortlessly change from a horizontal dash to a vertical one.

Once the researchers looked at the footage, however, they discovered that the roaches would rather ram their heads right into the wall, absorb the force, bounce to a climbing angle and continue scurrying. This method was used 80 percent of the time. The rest of the time, the roaches angled themselves up a bit before colliding with the wall, resulting in a slower approach.

The caution was generally unnecessary. The researchers found that those roaches that rammed into the wall made the vertical shift just as quickly — about 75 miliseconds — as those that showed a little bit of caution. However, given that they're not slowing down when colliding with a wall, this affords the roaches a higher chance of escaping a predator, and that can make a huge difference in survival.

"Their bodies are doing the computing, not their brains or complex sensors," Kaushik Jayaram, a biologist at Harvard University and lead author of the study, told The New York Times.

Better robots

To determine if this approach would translate to robots, helping them navigate difficult terrain, Jayaram and the research team constructed a small, palm-sized six-legged robot named DASH that lacked sensors in the front. The robot would rely on its body to navigate, like the roach. The researchers added an inclined cone called "the nose" to facilitate any potential upward angling the robot might achieve. The filmed the robot using the same methods as the roaches.

DASH managed to make the head-on vertical transition, much like the roaches. In the next iteration of the DASH, the team hopes to add "substrate attachment mechanisms" so it can climb the wall following the transition movement.

The researchers consider their approach a "paradigm shift" for robotics, a new way forward when it comes to constructing them. By relying on a more mechanical-based approach, rather than sensor-based, the robots can be more robust and explore difficult areas more easily.