.. _calibration-part2-label: ************************************ Calibration Part2 (Robot Kinematic) ************************************ The Rosvita package **egomo_calibration** (``/home/xamla/git/egomo_calibration``) containts scripts for robot calibration and hand-eye optimization. It is written in Python and C++ and uses |Ceres_link| to optimize the robot kinematic modelled by |Denavit-Hartenberg_link|. .. note:: The robot kinematic calibration described here, has been used to calibrate an SDA10 robot. For usage with an UR5 or other robots, some adaptions to the scripts will be necessary. **Calibration pattern requirements:** For all robot kinematic and hand-eye calibrations one of our |Circle_Pattern_link| (see also ``/home/xamla/Rosvita.Control/lua/auto_calibration/Patterns_with_ID.pdf``) has to be used. For a high-quality print of one of these patterns contact us (http://xamla.com). .. _sphere-sampling-label: Capturing calibration data via automatic sphere sampling -------------------------------------------------------- Automatic sphere sampling is performed via the **auto_calibration** package of Rosvita (see :ref:`calibration-part1-label`). To use the automatic sphere sampling, you first have to define a good **starting pose** for the robot arm that will be calibrated. In the following, let us assume a stereo camera setup with the cameras mounted at the endeffector of the robot arm and looking in the direction of the z-axis of the endeffector. With this setup the calibration target has to be fixed onto the table and the robot has to be moved to a pose where the cameras look down at the target approximately straight from above and such that all target points are in the field of view (FOV) of the cameras (see Fig. 16.1). Save this starting pose of the robot (or better the joint values) to the Rosvita world view and move the robot to this posture before starting the sphere sampling. .. figure:: images/SphereSampling_Start.png Figure 16.1 Starting pose for sphere sampling with left arm. Moveover, an initial guess hand-eye and stereo camera calibration is needed, which can be received e.g. by running the **auto_calibration** scripts **configureCalibration.lua** and **runCalibration.lua** (see :ref:`calibration-part1-label`). Now, to start the sphere sampling, with the Rosvita terminal go into your project folder and run the configuration script from the **auto_calibration** package: .. code-block:: bash cd /home/xamla/Rosvita.Control/projects/ th ../../lua/auto_calibration/configureCalibration.lua -cfg .t7 Then press .. code-block:: bash a (Generate capture poses via sphere sampling) You'll have to choose the camera setup. Currently, two possibilities are implemented: .. code-block:: bash e end-of-arm camera setup t torso camera setup Choose the option e (end-of-arm camera setup). After that, you have to enter the number of capture poses you want to sample. In order to obtain good calibration results, you should choose a rather large number of about 100-200 poses. Next you have to enter the paths to the previously generated intial guesses for the hand-eye calibration and stereo camera calibration (e.g. ``/calibration/_