ROS node for transformation between robot head and robot

Clopema_robothead stack - hydro-devel branch

  1. roslaunch clopema_launch start_robot.launch
  2. roslaunch rh_integration integrate.launch
  3. rosrun rh_integration rh_integration [arm][-l]
    • arm parameter can be r1 or r2, default value of parameter is r1
    • "-l" means skip of capturing of photos and detection of markers, it only loads marker poses and detected corners in images from file in output path.
    • example: rosrun rh_integration rh_integration r2

On the end, rh_integration node saves calibration to:
/clopema_testbed/clopema_description/calibration_PARTNER/stereohead_left_camera.calib
/clopema_testbed/clopema_description/calibration_PARTNER/stereohead_right_camera.calib

Preparing

  • Marker description: /clopema_testbed/clopema_description/urdf/alvar_marker.urdf.xacro
  • This xacro is loaded in: clopema_description/robots/clopema_PARTNER.urdf.xacro
    (origin is target center)
  • As the rh_integration node saves calibration file for left and right camera in order to base_link, you have to define this in:
    clopema_description/robots/clopema_PARTNER.urdf.xacro

integrate.launch

  • These parameters are for setting of the first calibration position. In this position, marker should be visible
    in the left down corner of images and perpendicular to the axis of the cameras.

    <param name="/RH/integration/startPose/position/x" value="0.2" type="double"/>
    <param name="/RH/integration/startPose/position/y" value="-0.8" type="double"/>
    <param name="/RH/integration/startPose/position/z" value="0.9" type="double"/>
    <param name="/RH/integration/startPose/orientation/x" value="-0.25" type="double"/>
    <param name="/RH/integration/startPose/orientation/y" value="0.64" type="double"/>
    <param name="/RH/integration/startPose/orientation/z" value="-0.26" type="double"/>
    <param name="/RH/integration/startPose/orientation/w" value="0.67" type="double"/>

  • These parameters are for setting of calibration space. It is in meters.

    <param name="/RH/integration/usableArea/x" value="0.85" type="double"/>
    <param name="/RH/integration/usableArea/y" value="0.7" type="double"/>
    <param name="/RH/integration/usableArea/z" value="0.5" type="double"/>

  • These parameteres are indexex of used Alvar markers

    <param name="RH/integration/AlvarMarkerIndexLeft" value="2" type="int"/>
    <param name="RH/integration/AlvarMarkerIndexRight" value="2" type="int"/>

  • This parameter sets output path, where images, marker poses, and detected marker corners are stored

    <param name="/RH/integration/outputPath" value="output/" />

rh_integration.cpp

In this file, you can experiment with these parameters:
  • int numPos = 3; - number of calibration positions
  • double div_y = 8.0; - magic number which approaches calibration position towards the robot with increasing z value of target pose
  • double decr_y, decr_x; - magic numbers which decrease distance between calibration positions with increasing z value of target pose

These parameters are because of limited visible area of cameras.

sticked_alvar.png (700 KB) Karel Krehnac, 01/30/2014 15:53