1. A walking control method of a robot comprising: setting a plurality of variables to determine target joint routes and control gains as control variables; calculating, by a computer, torque input values based on the control variables; obtaining a resultant motion through calculation of forward dynamics using the calculated torque input values; setting an objective function consisting of the sum total of a plurality of performance indices; and adjusting, by a computer, the control variables so that a value, calculated using the obtained resultant motion, of the objective function satisfies a predetermined condition.