The four-legged robot resembles a dog walking over sand, rocks and other difficult surfaces.

As it moves forward, the black robot adjusts its stride and adapts without falling.

Inside a living room, researchers poured oil on plastic to create a slick surface.

They piled planks and other obstacles.

They dropped weight on the robot’s back.

Each time, the robot recovered its balance and continued forward.

“The challenges of robotics are that there is a lot of this real-world variability,” Malik said.

“It was whatever I could find in some sense,” Kumar said.

The robot also broke multiple times during the testing.