Note: This is a set of pointers and advice for how to calibrate a new sensor to the PR2. Note that this is an unsupported use case, and this is by no means a comprehensive set of instructions..
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Calibrating a new sensor on the PR2

Description: The pr2_calibration stack is configured to work out-of-the-box with the PR2's standard sensor suite. The stack, however, also provides hooks for adding new sensors. These hooks are not fully documented or supported, but it is in fact possible to add a new sensor to the full robot calibration.

Tutorial Level: ADVANCED

Data Capture

Add new Pipeline Nodes

  • Each sensor has a collection of nodes that process sensor data. The pr2_calibration_executive gives a brief overview about the camera, chain, and laser pipelines.

Any new sensor pipeline should be added to pr2_calibration_launch/capture_data/all_pipelines.launch.

The standard pipeline is defined in pr2_calibration_launch/capture_data/monocam_pipeline.launch

The pipelines for the PR2's stereocameras simply constructs 4 instances of monocam_pipeline.launch. See double_stereo_pipeline.launch

Executive Sensor Configuration

You now need to tell the executive about the new sensor. This is done by adding it to one of the sensor configuration files. If this is a camera, you should add a camera to cam_config.yaml. The format is described in pr2_calibration_executive

Executive Sample Configuration

You now need to update some subset of the samples to include the new camera. The samples are defined in pr2_calibration_launch/capture_data/samples_pr2_beta

Estimation

You probably will want to keep pr2_calibration_estimation as a reference for understanding these steps.

Adding additional frames

The estimator uses a yaml representation of the robot that mirrors the URDF. (Yes, this file is extremely redundant to the URDF, and hopefully it will be removed if/when we do a major iteration on the calibration stack). For the PR2, this file is pr2_calibration_launch/estimate_params/config_pr2_beta/system.yaml.

Verify that your frames are correct

We currently run a test to make sure that the yaml robot definition matches the actual URDF. This test available at pr2_calibration_estimation/test/test_pr2_fk.launch. Since inconsistencies between the yaml and URDF could lead to strange calibration results, you should probably copy and modify this test to make sure your added frames also match your URDF.

Adding a sensor definition

You added the additional frames, but you now have to tell the estimator how the new sensors attach to the new frames. pr2_calibration_launch/estimate_params/config_pr2_beta/sensors.yaml.

Updating free parameter definitions

The main config for the multistep optimization is defined in pr2_calibration_launch/estimate_params/head_then_arms_params.launch. Here, for each step, a yaml file is loaded into free_params. Each free_params yaml file defines which parameters are free during that optimization step. You must add your fields for any robot primitives you've added, along with fields for the sensor itself.

These files are defined for the pr2 as pr2_calibration_launch/estimate_params/config_pr2_beta/free_*.yaml

Example: Adding the Prosilica Camera

The following diff encompass adding the prosilica camera to the calibration pipeline for the PR2. Unfortunately, this changelog has a a couple extraneous tweaks with changing the wide stereo tolerance and some image scaling.

The diff is available here: pr2_calibration diff

Wiki: pr2_calibration/Tutorials/Calibrating a new sensor to the PR2 (last edited 2010-09-24 00:13:15 by VijayPradeep)