Officers had been responding to a robbery call outside a fast-food restaurant