1. A method of controlling an articulated robot, comprising of the steps of: calculating a first joint angle vector indicating target joint angles of respective joints of the robot based on a target position matrix indicating a desired target position; supplying a neural network with said first joint angle vector so as to obtain a compensation amount corresponding to said target position matrix; multiplying said target position matrix with said compensation amount so as to obtain a compensated target position matrix; calculating a second joint angle vector indicating target joint angles of the respective joints of the robot based on said compensated target position matrix; and controlling the robot in accordance with the second joint angle vector.