The invention relates to a method of cleaning at least a part of a cubicle from a row of individual cubicles in a stable, each cubicle having lateral partitions extending in the longitudinal direction on each side of the cubicle, the method comprising the steps of providing an animal presence sensor for detecting the presence of an animal in a cubicle, and providing an autonomous unmanned vehicle, the vehicle comprising a control system for controlling the operation of the vehicle and cubicle floor cleaning means, and the method further comprising the steps of detecting by an animal presence sensor a first of the cubicles free of an animal, detecting whether an animal is present in a second of the cubicles neighboring next to the first cubicle, and controlling the autonomous vehicle to clean the first cubicle in a first cleaning mode that is dependent on the presence of an animal in said second neighboring cubicle. The invention also relates to an autonomous unmanned vehicle for cleaning cubicles.