We explain a procedure for getting models of robot kinematics and dynamics that are appropriate for robot control design. The procedure consists of the following steps: (i) derivation of robot kinematic and dynamic models and establishing correctness of their structures; (ii) experimental estimation of the model parameters; (iii) model validation; (iv) identification of the remaining robot dynamics, not covered with the derived model. We give particular attention to the design of identification experiments and to on-line reconstruction of state coordinates, as these strongly influence the quality of the estimation process. The importance of correct friction modeling and the estimation of friction parameters are illuminated. The models of robot kinematics and dynamics can be used in model-based nonlinear control. The remaining dynamics cannot be ignored if high performance robot operation with adequate robustness is required. The complete procedure is demonstrated for a direct-drive robotic arm with three rotational joints.