Documentation Status

Cannot load information on name: robotino_calibration, distro: electric, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: fuerte, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: groovy, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: hydro, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: indigo, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: jade, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: kinetic, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: robotino_calibration, distro: lunar, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.

robotino_calibration

Code at https://github.com/squirrel-project/squirrel_calibration.

Introduction

This package lets you calibrate the mounting position of the Robotino's RGB-D sensor (Asus Xtion).

It will later also feature the possibility to calibrate the arm mounting position against the camera.

Installation Requirements

Please download the following additional repositories into your workspace

git clone https://github.com/ipa320/cob_object_perception.git
git clone https://github.com/ipa320/cob_perception_common.git

and install all dependencies by moving into your catkin workspace (the folder where you type catkin_make) and run

rosdep update
rosdep install --from-paths /src -y -i

Calibrating the RGB-D camera's mounting position

The calibration process needs an external calibration pattern and can be conducted using either one single checkerboard or any number of Pi-Tags. The locations of these markers are determined by a reference coordinate system which is measured via laser scanner and which is located either inside a corner of two perpendicular walls or at the edge of a box located at a wall.

Laser Scanner

This calibration necessitates that the laser scanner is mounted perfectly parallel to the ground and its mounting position must be known as accurately as possible. If the construction does not yet yield accurate enough figures, the following steps might help.

  1. Conduct a laser scanner to base calibration, see README.md at https://github.com/federico-b/squirrel_nav/tree/laser_odom_calibration/laser_odom_calibration.

  2. Measure laser scanner height and put in the number into the properties.urdf.xacro file of your robot which is located, e.g., at squirrel_robotino/robotino_bringup/robots/uibk-robotino/urdf/properties.urdf.xacro. There search for the block:

      <!-- hokuyo mount positions | relative to base_link -->
      <property name="hokuyo_x" value="0.131740483"/>
      <property name="hokuyo_y" value="0.00937244242"/>
      <property name="hokuyo_z" value="0.102"/> <!-- not used, apprx -->
      <property name="hokuyo_roll" value="0.0"/>
      <property name="hokuyo_pitch" value="0.0"/>
      <property name="hokuyo_yaw" value="-0.0536545473"/>

    and enter the measure at hokuyo_z. Optimally, you measure your laser scanner height using a level that is shifted downwards a ruler until it becomes visible in the laser scan. Repeat the procedure from below: shifting the level upwards until visible in the laser scan. Take the average of both measured heights.

Reference coordinate system for the laser scanner

The robot must be localized against the environment using its laser scanner. Choose one of the following procedures for establishing a reference coordinate system with the laser scanner.

Box

This method requires a flat wall segment of at least 2.0 m length, i.e. there should not be any objects around. In the center of this wall segment place a small box, which is higher than the laser scanner mounting height and which has to touch the wall. The box must stand apart from the wall by more than 11 cm. The box is used to localize the calibration pattern with the laser scanner. Similarly, place robotino at the center of the wall segment facing the box with its laser scanner.

The setup should look similar to the following examples. The last image visualizes the reference coordinate system landmark_reference_nav which has the same orientation as its parent, the hokuyo laser scanner, and which is located at the intersection of the left box edge and the wall at ground level (if laser scanner is mounted parallel to the ground and the reference_coordinate_system_at_ground option is activated).

Box localization setup Box localization setup

Box localization setup Box localization setup

There are some properties you may want to edit in order to match your calibration environment well. These properties can be found in the squirrel_calibration/relative_localization/ros/launch/box_localization_params.yaml file.

# Defines how fast new measurements are averaged into the transformation estimate (new_value = (1-update_rate)*old_value + update_rate*measurement). [0,1]
# double
update_rate: 0.75

# The name of the computed child frame.
# string
child_frame_name: "/landmark_reference_nav"

# If the laser scanner is mounted parallel to the ground plane and this flag is activated, the reference coordinate system child_frame_name will be established at ground height (instead of laser scanner mounting height)
# bool
reference_coordinate_system_at_ground: true

# the (minimum) length of the frontal wall segment left of the laser scanner's origin (assuming the robot faces the wall), in [m]
# double
wall_length_left: 0.8

# the (minimum) length of the frontal wall segment right of the laser scanner's origin (assuming the robot faces the wall), in [m]
# double
wall_length_right: 0.8

# the maximum +/-y coordinate in laser scan to search for the localization box, in[m]
# double
box_search_width: 0.6

Corner

This approach localizes the robot against a corner of two perpendicular walls. Ensure that there are no objects around that corner (in a 2-3 m range) because they could interfere with the correct localization of the corner. The robot should be placed facing one of these walls, as you can see in the following images. The second image visualizes the reference coordinate system landmark_reference_nav which has the same orientation as its parent, the hokuyo laser scanner, and which is located at the intersection of the two walls at ground level (if laser scanner is mounted parallel to the ground and the reference_coordinate_system_at_ground option is activated).

Corner localization setup Corner localization setup

It does not matter whether the second wall is located on the lefthand or righthand side of the robot as the software automatically picks the frontal wall first and then seeks the best fitting perpendicular wall closest to the robot with a maximum amount of support points in the laser scan (however, it has to be on the lefthand side in case you want to run the predefined calibration setup).

There are some properties you may want to edit in order to match your calibration environment well. These properties can be found in the squirrel_calibration/relative_localization/ros/launch/corner_localization_params.yaml file

# Defines how fast new measurements are averaged into the transformation estimate (new_value = (1-update_rate)*old_value + update_rate*measurement). [0,1]
# double
update_rate: 0.25

# The name of the computed child frame.
# string
child_frame_name: "/landmark_reference_nav"

# If the laser scanner is mounted parallel to the ground plane and this flag is activated, the reference coordinate system child_frame_name will be established at ground height (instead of laser scanner mounting height)
# bool
reference_coordinate_system_at_ground: true

# the (minimum) length of the frontal wall segment left of the laser scanner's origin (assuming the robot faces the frontal wall), in [m]
# double
wall_length_left: 0.3

# the (minimum) length of the frontal wall segment right of the laser scanner's origin (assuming the robot faces the frontal wall), in [m]
# double
wall_length_right: 0.3

# the maximum distance of the side wall to the laser scanner, in [m]
# double
max_wall_side_distance: 3.0

Mount markers in the environment

Chose one of the following marker types that are used to calibrate the camera. You can find some printout templates for suitable markers at squirrel_calibration/robotino_calibration/common/files/ (checkerboard) or at squirrel_calibration/robotino_calibration_sim/worlds/prefabs/pitags/tagXX (Pi-Tags).

Checkerboard

Mount a calibration checkerboard (e.g. from robotino_calibration/common/files/checkerboard_a3_6x4_5cm.pdf in A3 size printed at 100%) horizontally on a wall (use a level to be precise), approximately at the height of Robotino's Kinect (at the moment this is left upper chessboard calibration corner approx. at 80 cm height above ground).

If you are using the box-based localization, you might want to align the box with the leftmost line of checkerboard calibration points (i.e. where 4 squares meet) for simplicity of defining coordinate transformations. Align the left side of the box with the leftmost calibration points. The following images illustrate this setup.

Pattern Mounting Position Pattern Mounting Position

Measure the vertical distance between ground plane and the upper left checkerboard point and insert this number into file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard.launch at the line:

<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_checkerboard" output="screen" args="0.0 -0.8 0 0 0 0  landmark_reference checkerboard_frame 100"/>

Replace the -0.8 at the y-offset with your measured number in meters. All other numbers should be 0 if the box is aligned with the checkerboard as described above. Use a negative measure because the y-axis of frame landmark_reference is pointing into the ground floor.

Enter the properties of the used calibration pattern (grid size, square side length) into file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard_params.yaml at the lines:

### checkerboard parameters
# side length of the chessboard squares
chessboard_cell_size: 0.05
# number of checkerboard calibration points (in x- and y-direction, i.e. horizontal and vertical), i.e. those points where 4 squares meet
chessboard_pattern_size: [6,4]

Pi-Tags

Performing a calibration with Pi-Tags you may place as many tags in your environment as you desire. In the pre-set configuration there are nine tags in total. Three of them have to be placed at the wall in front of the robot, the next triple resides on the floor in front of the robot and the last three tags are located on a wall to the left of the robot. The following picture visualizes this exemplary setup.

Pi-Tag Mounting Position

To perform a successful calibration it is recommended to align the Pi-Tags to the coordinate systems of the robot, i.e. mount Pi-Tags at the walls parallel to the ground and place Pi-Tags on the ground parallel to the walls, e.g. as depicted above.

File squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag.launch already provides convenient coordinate system definitions if you follow this advice. The defined coordinate systems landmark_reference_front, landmark_reference_left, and landmark_reference_ground are children of the reference system landmark_reference_nav, which originates from the localization algorithm. These coordinate systems are not translated but rotated against landmark_reference_nav in the respective direction of the Pi-Tag orientation at the frontal or left wall, or at the ground.

<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_marker_nav_front" output="screen" args="0.0 0.0 0.0 -1.57079632679 0 1.57079632679  landmark_reference_nav landmark_reference_front 100"/>
...
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_marker_nav_left" output="screen" args="0.0 0.0 0.0 0 0 1.57079632679  landmark_reference_nav landmark_reference_left 100"/>
...
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_marker_nav_ground" output="screen" args="0.0 0.0 0.0 -1.57079632679 0 0  landmark_reference_nav landmark_reference_ground 100"/>

These definitions are illustrated further below.

Finally, the real world locations of the mounted Pi-Tags must be entered into squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag.launch in relation to a known coordinate frame (this is typically one of the convenience frames landmark_reference_front, landmark_reference_left, or landmark_reference_ground because the tag mounting pose is then just a translation). Please notice that each Pi-Tag position relates to the center of its upper left circle, the one that is marked with a bright cross.

The relative translation of the different tags is visualized in the following images and the respective measured translations that go into file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag.launch are mentioned thereafter.

Pi-Tag Mounting Position Front

<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_25" output="screen" args="0.8 0.75 0.01 0 0 0  landmark_reference_front tag_25 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_36" output="screen" args="0.8 0.55 0.01 0 0 0  landmark_reference_front tag_36 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_38" output="screen" args="1.0 0.65 0.01 0 0 0  landmark_reference_front tag_38 100"/>

Pi-Tag Mounting Position Ground

<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_48" output="screen" args="-0.6 0.75 0.01 0 0 0  landmark_reference_left tag_48 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_55" output="screen" args="-0.6 0.55 0.01 0 0 0  landmark_reference_left tag_55 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_64" output="screen" args="-0.4 0.65 0.01 0 0 0  landmark_reference_left tag_64 100"/>

Pi-Tag Mounting Position Left Pi-Tag Mounting Position Left

<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_69" output="screen" args="0.4 -0.2 0.01 0 0 0  landmark_reference_ground tag_69 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_73" output="screen" args="0.7 -0.2 0.01 0 0 0  landmark_reference_ground tag_73 100"/>
<node pkg="tf" type="static_transform_publisher" name="static_transform_publisher_landmark_tag_79" output="screen" args="1.0 -0.2 0.01 0 0 0  landmark_reference_ground tag_79 100"/>

The whole transformation chain from laser scanner to Pi-Tags, e.g. at the frontal wall, is hokuyo_link --> landmark_reference_nav --> landmark_reference_front --> tag_25, which is illustrated below.

Pi-Tag Mounting Position Front

Configuration for calibration

  1. Check whether all coordinate frame names are correctly chosen in file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard_params.yaml or squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag_params.yaml (depending on utilized marker type) at the lines:

    # link names for the robot coordinate systems
    # string
    # fixed frame at lower torso end (i.e. this coordinate system should not turn if different pan angles are commanded)
    torso_lower_frame: "base_pan_link"
    
    # last link of torso chain [the transformations between torso_lower_frame and torso_upper_frame should be available from tf]
    torso_upper_frame: "tilt_link"
    
    # camera frame with fixed transform to torso_upper_frame [transform from torso_upper_frame to camera will be calibrated by this program]
    camera_frame: "kinect_link"
    
    # this is the camera coordinate system which refers to the color image sensor [the transformations between camera_frame and camera_optical_frame should be available from tf]
    camera_optical_frame: "kinect_rgb_optical_frame"
    
    # the robot base frame [the transformation between laser scanner and base should be accomplished before, the transform from base_frame to torso_lower_framewill be calibrated by this program]
    base_frame: "base_link"
    
    # base name of all frames generated by cob_fiducials, each Pi tag number will be attached to this string.
    marker_frame_base_name: "tag"
  2. Fill in good initial values for the transformations to estimate in file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard_params.yaml or squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag_params.yaml (depending on utilized marker type), e.g.

    ### initial values for transformation estimates
    # insert the values as x, y, z, yaw (rot around z), pitch (rot around y), roll (rot around x)
    # the transform from base_frame to torso_lower_frame
    T_base_to_torso_lower_initial: [0.25, 0, 0.5, 0.0, 0.0, 0.0]
    
    # the transform from torso_upper_frame to camera_frame
    T_torso_upper_to_camera_initial: [0.0, 0.065, 0.0, 0.0, 0.0, -1.57]
  3. Choose one of the following two ways for defining a set of robot configurations, i.e. the pose and pan tilt unit configurations. This setting is located in file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard_params.yaml or squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag_params.yaml (depending on utilized marker type).

    1. You may define ranges for each parameter which will be used to generate the configuration set for you. Keep in mind that this method will only be chosen, when the use_range flag is set to true, otherwise the fixed parameter set is utilized.

      ### Observation positions for capturing calibration images of the marker
      # if this flag is true, then the robot configurations will be sampled on a equally spaced grid from the given ranges, if false, the user-provided configurations in robot_configurations will be used
      # bool
      use_range: true
      
      # ranges for the degrees of freedom of the robot
      # each parameter is set as [min_value, step, max_value]
      # double
      x_range: [-1.5, 0.25, -0.75]       # in [m]
      y_range: [-1.0, 1.0, -1.0]       # in [m], fixed y-coordinate
      phi_range: [0.0, 1.0, 0.0]         # in [rad], fixed phi-angle
      pan_range: [-0.52, 0.04, 1.04]     # in [rad]
      tilt_range: [-0.44, 0.04, 1.04]    # in [rad]
    2. Alternatively, a set of robot configurations can be specified explicitly. Fill in a good amount (i.e. >30) of robot configurations for observing the marker(s) measured relative to the landmark_reference_nav coordinate system that is similarly aligned as the robot's base_link when the robot faces the marker. It makes sense to have observation positions from close, mid-range, and long distance and capture 3x3 images with the marker in all image corners and between and 4 additional images around the center.

      ### checkerboard observation positions for capturing calibration images
      # list of robot configurations for observing the checkerboard measured relative to the landmark_reference_nav coordinate system that is similarly aligned as the robot's base_link facing the marker (e.g. checkerboard)
      # includes 5 parameters per entry: robot pose: x, y, phi and torso: pan, tilt
      robot_configurations: [-1.5, -0.17, 0, 0.15, 0.25,
                             -1.5, -0.17, 0, 0.0, 0.3,
                             -1.5, -0.17, 0, -0.15, 0.3,
                             -1.5, -0.17, 0, -0.3, 0.3,
                             -1.5, -0.17, 0, -0.5, 0.3,
                             -1.5, -0.17, 0, 0.15, 0.05,
                             -1.5, -0.17, 0, 0.0, 0.05,
                             -1.5, -0.17, 0, -0.15, 0.05,
                             -1.5, -0.17, 0, -0.3, 0.05,
                             -1.5, -0.17, 0, -0.5, 0.05,
                             -1.5, -0.17, 0, 0.15, -0.2,
                             -1.5, -0.17, 0, 0.0, -0.2,
                             -1.5, -0.17, 0, -0.15, -0.2,
                             -1.5, -0.17, 0, -0.35, -0.2,
                             -1.5, -0.17, 0, -0.5, -0.2,
                             -1.0, -0.17, 0, 0.0, 0.2,
                             -1.0, -0.17, 0, -0.2, 0.2,
                             -1.0, -0.17, 0, -0.45, 0.2,
                             -1.0, -0.17, 0, 0.0, 0.05,
                             -1.0, -0.17, 0, -0.2, 0.05,
                             -1.0, -0.17, 0, -0.45, 0.05,
                             -1.0, -0.17, 0, 0.0, -0.15,
                             -1.0, -0.17, 0, -0.2, -0.15,
                             -1.0, -0.17, 0, -0.45, -0.15,
                             -0.85, -0.17, 0, 0.0, 0.15,
                             -0.85, -0.17, 0, -0.15, 0.15,
                             -0.85, -0.17, 0, -0.35, 0.2,
                             -0.85, -0.17, 0, 0.0, 0.05,
                             -0.85, -0.17, 0, -0.15, 0.05,
                             -0.85, -0.17, 0, -0.35, 0.05,
                             -0.85, -0.17, 0, 0.0, -0.1,
                             -0.85, -0.17, 0, -0.15, -0.1,
                             -0.85, -0.17, 0, -0.35, -0.1]

Run the calibration

For starting the calibration procedure call

roslaunch robotino_calibration camera_base_calibration.launch reference:=foo marker:=bar

where foo can either be box or corner and bar can be set to checkerboard or pitag. For example, if you want to start a calibration using a corner and Pi-Tags, you have to type:

roslaunch robotino_calibration camera_base_calibration.launch reference:=corner marker:=pitag

The robot will drive into different observation positions and move the torso to capture calibration images of the marker(s) at the wall(s). After image recording, the intrinsic camera calibration (checkerboard only) and the extrinsic transform estimation will start and output their results in the end.

During image acquisition, all image and transformation data is also stored to disk so that calibration can run again offline with the load_images parameter set in file squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_checkerboard_params.yaml or squirrel_robotino/robotino_calibration/ros/launch/camera_base_calibration_pitag_params.yaml.

Transfer the calibrated values into the robot configuration

Replace the extrinsic calibration parameters output by the program in your squirrel_robotino/robotino_bringup/robots/xyz_robotino/urdf/properties.urdf.xacro, e.g.

  <!-- pan_tilt mount positions | handeye calibration | relative to base_link -->
  <property name="pan_tilt_x" value="0.308614"/>
  <property name="pan_tilt_y" value="-0.00660354"/>
  <property name="pan_tilt_z" value="0.669155"/>
  <property name="pan_tilt_roll" value="0.0205246"/>
  <property name="pan_tilt_pitch" value="-0.00419423"/>
  <property name="pan_tilt_yaw" value="0.208381"/>

  <!-- kinect mount positions | handeye calibration | relative to pan_tilt_link -->
  <property name="kinect_x" value="0.00633317"/>
  <property name="kinect_y" value="0.0586273"/>
  <property name="kinect_z" value="0.010865"/>
  <property name="kinect_roll" value="-1.50705"/>
  <property name="kinect_pitch" value="0.0150564"/>
  <property name="kinect_yaw" value="0.0080777"/>

The program also writes these calibrated values into a text file. The file can be found at ~/.ros/robotino_calibration/camera_calibration/camera_calibration_urdf.txt.

Correct the Kinect's z_scaling Parameter

The calibration normally gives pretty good results, but the point cloud might still appear badly aligned. In this case the point cloud's scaling could be wrong, i.e. not perfectly matching the metric reality. This can be adjusted with dynamic reconfigure. Start a dynamic_reconfigure client and go to the kinect/driver page and tweak the z_scaling until it appears to match the laser scanner readings, for example. You can get the best results if you are running the Pi-Tag marker detection at the same time and align the detected markers with the point cloud data (watch it in RViz) while tweaking the z_scaling. In RViz you have to add the topics /kinect/depth_registered/points (PointCloud2) and /fiducials/fiducial_marker_array (MarkerArray) in order to confirm that the RGB image (i.e. detected Pi-Tag markers) matches the point cloud. The Pi-Tag marker detection can be started as standalone program by running

roslaunch robotino_calibration fiducials.launch

and subscribing to a marker topic (otherwise it will not publish data)

rostopic echo /fiducials/detect_fiducials

Once you have found a suitable scaling, you can put it into a launch file to use it everytime with the driver. You may put it in squirrel_robotino/robotino_bringup/robots/xyz_robotino/launch/xyz_robotino.launch as

<param name="/kinect/driver/z_scaling" value="1.07"/>

[NOT YET] Calibrating the mounting position of the arm

This calibration process needs a calibration checkerboard to calibrate the transformation between the robot's base and its arm base. It's a good practice to use a checkerboard gripper that can be screwed on top of the arm's gripper frame.

Checkerboard Gripper

Preparation

To begin with, attach a checkerboard to the arm. Measure the translation of the reference corner of the checkerboard relative to the arm link it has been attached to. The reference frame should always be located at the second upper left corner as shown in the picture.

Checkerboard Frame

Also ensure that the checkerboard frame is aligned the same way as in the picture with x-axis (red) going from left to right and y-axis (green) pointing downwards. The z-axis is pointing into the plane. Make sure that the checkerboard transformation is available from TF, this can be done by adding it directly to the robot model or by using a static transform. By choosing the latter case you have to add the static transform to the arm_base_calibration.launch file before the arm_base_calibration node inside squirrel_robotino/robotino_calibration/ros/launch.

The following image illustrates an example setup for the RAW robot:

RAW Setup

Afterwards, fill in the corresponding arm_base_calibration_params_Robotino.yaml file which is located in squirrel_robotino/robotino_calibration/ros/launch:

### checkerboard parameters
# side length of the chessboard squares
# double
chessboard_cell_size: 0.03

# Degrees of freedom of arm
# int
arm_dof: 6

# Degrees of freedom of camera
# int
camera_dof: 2

# number of checkerboard calibration points (in x- and y-direction), i.e. those points where 4 squares meet
chessboard_pattern_size: [10,6]

### initial values for transformation estimates
# insert the values as x, y, z, yaw (rot around z), pitch (rot around y'), roll (rot around x'')
# transform from base to first link of arm.
T_base_to_armbase_initial: [0, 0, 0, 0, 0, 0]

# the robot base frame [the transformation between laser scanner and base should be accomplished before, the transform from base_frame to armbase_frame will be calibrated by this program]
# string
base_frame: "base_link"

# arm frame attached to robot base
# string
armbase_frame: "arm_base_link"

# checkerboard frame attached to arm (2nd upper left corner) [the transformation between armbase and checkerboard_frame should be available from tf]
# this transformation is created in the arm_base_calibration.launch file.
# string
checkerboard_frame: "checkerboard_frame"

# this is the camera coordinate system which refers to the color image sensor [the transformations between base_frame and camera_optical_frame should be available from tf]
# string
camera_optical_frame: "kinect_rgb_optical_frame"

# Image topic
# string
camera_image_topic: "/camera/color_image"

# Topic to control camera postion
camera_joint_controller_command: "/torso/joint_group_position_controller/command"

# topic names for commanding the pan tilt unit
# string
# pan controller
pan_controller_command: "/pan_controller/command"

# tilt controller
tilt_controller_command: "/tilt_controller/command"

# Topic to control the arm joints.
# string
arm_joint_controller_command: "/arm_controller/joint_group_position_controller/command"

# pan state
# string
pan_joint_state_topic: "/pan_controller/state"

# tilt state
# string
tilt_joint_state_topic: "/tilt_controller/state"

# Topic to retrieve the current arm state
# string
arm_state_command: "/arm_controller/joint_states"

# storage folder that holds the calibration output
# string
calibration_storage_path: "~/.ros/robotino_calibration/calibration"

### program sequence
# loads calibration images and transforms from disk if set to true
# bool
load_images: false

# max allowed deviation a target angle is allowed to have in terms of the current joint angle [rad]
# double
max_angle_deviation: 3

# calibration interface ID. Decides which robot's interface to use: 0 - Robotino, 1 - RAW
# int
calibration_ID: 0

Capturing arm and camera positions for calibration

To facilitate the process of capturing arm and camera positions for the automatical calibration process you can use the jointstate_saver software provided in squirrel_robotino/jointstate_saver. The software settings can be adjusted to your needs using the saver.launch file inside the launch folder. The program can be launched by calling:

roslaunch jointstate_saver saver.launch

Ensure that the camera has clear sight to the checkerboard for each position change. It is recommended to also run the camera_calibration node alongside to ensure that each captured position is valid, meaning that all corners of the checkerboard can successfully be detected. It is important to take into account that the calibration routine will replay the same order of positions you capture. So avoid too large gaps in between two positions to avoid potential collision issues as the paths might not be planned. The results can be found in the ~/.ros/jointstate_saver/output folder. Copy the content of ArmJointStates and CameraJointStates and paste them inside the arm_base_calibration_params_Robotino.yaml file to the corresponding settings. Be aware that the more positions (~30) have been captured the better the calibration result will be. There are at least three positions for camera and arm needed for the software to run the calibration. (The following settings are example values only)

### checkerboard observation positions for capturing calibration images
# list of arm link configurations (angles per link in [rad]) for observing the checkerboard attached to robot's end effector
# includes <arm_dof> parameters per entry.
arm_configurations: [0,0,0,0,0,0,
                     0.1,0.2,0.3,0.4,0.3,0.2,
                     0,0,0.5,0.3,-0.2,0]

# list of camera link configurations (angles per link in [rad]) for observing the checkerboard attached to robot's end effector
# includes <camera_dof> parameters per entry.
camera_configurations: [0,0,
                        0.3,0.2
                        -0.1,0.3]

Starting the arm calibration routine

In order to start the process make sure that all settings in arm_base_calibration_params_Robotino.yaml are correct, ensure that the arm and camera have enough space to move and call afterwards:

roslaunch robotino_calibration arm_base_calibration.launch

The software will save an image of each position and all corresponding transformations for offline calibration (set load_images to true).

Transfer the calibrated values into the robot configuration

Replace these parameters in your squirrel_robotino/robotino_bringup/robots/xyz_robotino/urdf/properties.urdf.xacro file (example values):

  <!-- arm mount positions | handeye calibration | relative to base_link -->
  <property name="arm_base_x" value="0.323772"/>
  <property name="arm_base_y" value="-0.207722"/>
  <property name="arm_base_z" value="0.567751"/>
  <property name="arm_base_roll" value="-3.13495"/>
  <property name="arm_base_pitch" value="3.12087"/>
  <property name="arm_base_yaw" value="0.770357"/>

Wiki: robotino_calibration (last edited 2017-09-11 09:43:05 by ipa-rmb-mr)