Touch sensors on the robot's head versus on the robot's base can define a difference in height. A Vernier barometer raised and lowered by as little as a few feet can detect and define a height change. A hill can be defined by the pattern of altitude change as a robot climbs and descends it. A gyro sensor can detect the accompanying changes in inclination of the robot ("pitching"). gps sensors can also give altitude information but they are much less sensitive.