This paper describes environmental sensing for a cleaning robot of a fattening piggery. Its environmental conditions include a long, narrow corridor, various types of fences, and a light mist for cleaning. We focus on the development of a fence recognition system using a SOKUIKI sensor (LiDAR) and discuss our experimental results from a real fattening piggery.