A value of shape data is calculated from moment of inertia and weight data of a tool, a relational expression between shape data and tool moment of inertia in a predetermined tool shape model, and a relational expression between the shape data and tool weight in the tool shape model to estimate a shape of the tool, and a gravity center position of the tool is calculated based on the estimated tool shape.