clopema_calibration (package)

This repository should contain tools for calibration.

Calibration procedure

- Xtion Calibration Procedure

Calibration target

Calibration target can be found here Asus Xtion calibration.

HandEye calibration

Process of the calibration

The data will be saved in ~/.ros/clopema_calibration folder by the default but it is possible to change it in clopema_config package. After calibration is done, xtions have to be restarted to load calibration data.

  roslaunch clopema_launch start_robot.launch
  roslaunch clopema_calibration handeye_capture.launch robot:=1
  roscd clopema_calibration
  . scripts/handeye.sh

This approach will produce a reports for each xtion in $HOME/.ros/clopema_calibration/handeye/, example of such report can be found here.

Details

The service ('/capture') is used to capture calibration images. To capture calibration images for hand-eye calibration the following parameters must be set (see handeye_capture.launch):

   "clopema_calibration/handeye/folder" -- the folder where calibration data are saved this parameter is global and stored in clopema_config package
        <node name="capture_handeye_img" pkg="clopema_calibration" type="capture_calibration_images" output="screen">
                <param name="robot" value="1"/> -- id of the xtion (same as the robot id)
                <param name="target_center/x" value=".5"/> -- the position of the target in base_link frame
                <param name="target_center/y" value="-1"/>
                <param name="target_center/z" value=".6"/>

                <param name="grid/x/min" value=".3"/>  -- the grid on which robot is moving for(=min;<=max;+=step), the Xtion is watching on the target at each position of the grid
                <param name="grid/x/max" value=".7"/>
                <param name="grid/x/step" value=".2"/>

                <param name="grid/y/min" value="-1"/>
                <param name="grid/y/max" value="-.6"/>
                <param name="grid/y/step" value=".2"/>

                <param name="grid/z/min" value="1.2"/>
                <param name="grid/z/max" value="1.4"/>
                <param name="grid/z/step" value=".2"/>
        </node>

Script handeye.sh will run node providing dot matrix detector. The output of this node is also stored in calibration folder defined by the global parameter. Detected dots, measured poses and calibration images are then used to compute hand-eye calibration. Result of the calibration process is available as the html page, url is generated at the end of the calibration process or can by generated by the hand using pattern: (${calibration_folder}/report/index.html).

Tables calibration

For now, only table desk height and orientation is calibrated. There are three launch files in clopema_calibration package which allow us to calibrate each table manually. In all launch files there is an xtion argument which you can use to specify which xtion is used for calibration.
Process of the calibration:

roslaunch clopema_launch start_robot.launch
move the arm (with the xtion you want to use) manually so that xtion will look at the table you want to calibrate
roslaunch clopema_calibration table2_calibration.launch
restart ros

Calibration data are stored in ~/.ros/clopema_calibration/mechanical/{ID}_table.calib.

List of nodes

openni_capture

openni_capture is a node which subscribes rgb and depth topics from Xtion camera and provide service to save current images to file.

Subscribed topics:
  • rgb (sensor_msgs/Image)
  • depth (sensor_msgs/Image)

OpenniCapture service

string rgb_path          -- Path where output RGB image should go (~/test.png) for example.
string depth_path        -- Path where output depth image should go (~/test.pgm) for example.
---
bool success             -- False when there are no incoming images, True otherwise.

Note: The extension of depth image must be .pgm, the extension of RGB image can be whatever OpenCV is capable.

openni_capture_one

Similar to openni_capture but captures only on image and ends. This is useful when one needs to subscribe some topic save image and unsubscribe. In that case this node is called from other node as a subprocess.

pose_sequence_editor

Simple editor of the pose sequence using interactive markers. The edited path can be saved, loaded and executed. It is possible to call a service on each pose.

Graph Path Planning

The algorithms are store in matlab/path the main file is rcpath.m here is help which should explain all:

>> help rcpath
 RCPATH Compute Path for Calibration with RedCam.

  SYNOPSIS
    [G,L,P] = rcpath(filein, fileout, verbose)

  DESCRIPTION
    Reads graph G from filein. Finds all connected components and produce
    labeling L, i.e. L(i) = l denotes that node G{i,:} belongs to l-th
    component. Plans a path P{i} for each component i. P is sorted from longest
    to shortest.

    G is a cell array where G{i,:} is one node represented by id G{i,1} and list
    of neighbour nodes G{i,2}.

    The input file filein is supposed to have the following format. Firs line
    contain number of nodes and the rest of the files contains edges as a pair
    of point ids.

    If fileout is set and is not empty the path is also written into this file,
    each line containing path of one component.

    Note that the path search algorithm select start point at random.

Verification

Calibration of xtions can be checked by Verification