Locomotion emerges from effective interactions with aerial, aquatic, or terrestrial environments. The majority of terrestrial terrains experienced by search-and-rescue or exploratory robots are flowing grounds and are often composed of granular media. However, the lack of force models for granular environments has resulted in robotic systems that perform poorly on sandy hills. In contrast, many animal species and particularly snakes are highly versatile and remarkably successful at maneuvering on granular media. Thus, they can serve as sources of inspiration for transportation and robotic systems to traverse complex granular environments. In this talk, a series of experiments will be presented that can help us better understand the physics of sidewinder snakes’ interactions with granular media. We found a control template for sidewinding on sandy inclines: the use of two orthogonal waves whose relative amplitudes are modulated is the key to successful climbing on sand. Next, the first snake robot capable of climbing sandy hills benefitting from this control template will be demonstrated. Finally, some of our recent work on developing structured active or passive elastomeric surfaces for crawling robots will be discussed. In particular, several active and passive mechanisms for the control of fibrillar friction and adhesion will be presented. The findings of these studies will result in the development of adaptive attachment structures and control methods for effective all-terrain search-and-rescue and exploratory robots.