A method for operating a robot operating in an environment, the robot comprising a first sensor , a processor and a map of the environment in which it is operating, the map including indications of the location of other objects and/or features in the environment, including walls, boxes and/or shelves, the method comprising: generating sensor data from a first sensor of the robot , detecting a first object and a second object separated by less than a threshold distance by the first sensor , determining, by the robot , the location of the objects in the environment by utilizing the map, dismissing detection of motion of at least some of the other objects in the environment in the map, detecting the first or second object as a moving body and the moving body as a column-like body that is at least partially continuous between an intersect at one time and the intersect at another time, detecting a swinging portion of the column-like moving body with a stationary portion in close proximity as a leg, detecting alternating swings of the first object as a first leg of the person and of the second object as a second leg of the person, by the first sensor , wherein the second object being stationary and the first object being in motion with respect to the second object at a first instance in time, and the first object being stationary and the second object being in motion with respect to the first object at a different second instance in time; detecting a person based on the detection of the alternating swings of the first and second object , and performing, by the robot, an action in response to the detection of the person, wherein the action comprises: stopping the robot to allow the detected person to pass; resuming movement of the robot when the detected person has moved out of a field of view of the first sensor . generating sensor data from a first sensor of the robot , detecting a first object and a second object separated by less than a threshold distance by the first sensor , determining, by the robot , the location of the objects in the environment by utilizing the map, dismissing detection of motion of at least some of the other objects in the environment in the map, detecting the first or second object as a moving body and the moving body as a column-like body that is at least partially continuous between an intersect at one time and the intersect at another time, detecting a swinging portion of the column-like moving body with a stationary portion in close proximity as a leg, detecting alternating swings of the first object as a first leg of the person and of the second object as a second leg of the person, by the first sensor , wherein the second object being stationary and the first object being in motion with respect to the second object at a first instance in time, and the first object being stationary and the second object being in motion with respect to the first object at a different second instance in time; detecting a person based on the detection of the alternating swings of the first and second object , and performing, by the robot, an action in response to the detection of the person, wherein the action comprises: stopping the robot to allow the detected person to pass; resuming movement of the robot when the detected person has moved out of a field of view of the first sensor . <EOS>