1. A method of controlling walking of a robot, the method comprising: generating a walking pattern; calculating a walking pattern similarity corresponding to the walking pattern; and comparing the walking pattern similarity with a predetermined reference pattern similarity, and changing the walking pattern based on a result of the comparison.