1. A method for tuning a dynamical model of an industrial robot on a foundation, the method comprising the steps of: providing, with a parameter determining device, a first dynamical model of the robot, the first dynamical model comprising first model parameters representing dynamical properties of the robot; providing, with the parameter determining device, a second dynamical model of the foundation the robot is attached to, the second dynamical model comprising second model parameters representing dynamical properties of the foundation; obtaining, with the parameter determining device, information about dynamical properties of the foundation by moving the robot and by measuring at least one property affected by the movement; setting, with the parameter determining device, at least one of the second model parameters on the basis of the dynamical properties of the foundation; and controlling the robot using the first dynamical model and the second dynamical model.