# Custom Pose Computation

Each alignment component in wizard configuration has one pose computation page on HMI for user to customize pose computation. This page is configurable only when "Use Custom ToolBlock" is checked in alignment component during wizard configuration. Custom pose computation allows user to custom pose compute method based on specific requirements which cannot be achieved by other options.

## Alignment Custom Pose Computation

Take AlignToBase application for example, check on "Use Custom ToolBlock" in alignment component to enable custom pose computation.

The corresponding pose computation page is as below.

The inputs include command of the alignment task, hand-eye calibration results, features from run time and train time and their commands in which run time and train time stage poses are included, and user data if there is any user defined data.

Input | Type | Description
--- | --- | ---
Command | CommandArgs | Current command for pose computer task
HECalibResults | CogHandEyeCalibrationResults | Contains a list of CogHandEyeCalibrationResult objects, one for each camera.
TrainFeaturesData | List<CogAlpsPointFeature> / List<CogAlpsLineFeature>/ List<CogGenericFeature> | The list of train time features from connected feature finder
TrainFeaturesCommandData |  | The last train time command used for connected feature finder's image acquisition and feature extraction
Features | List<CogAlpsPointFeature> / List<CogAlpsLineFeature>/ List<CogGenericFeature> | The list of run time features from connected feature finder
FeaturesCommand | CommandArgs | The last run time command to trigger connected feature finder to run image acquisition and feature extraction
UserData | Dictionary | User defined data

The output is a linear transform from run time features to train time features in current selected space. And the implementation of the pose computing should be done within CogToolBlock using tools or scripting.

Output | Type | Description
--- | --- | ---
TrainFromRun | CogTransform2DLinear | The transform from run time features to train time features

## Assembly Custom Pose Computation

Here is one example of assembly application using custom pose computation and its corresponding pose computation page.

Since assembly uses pairs of features for pose computing, it has more inputs and outputs.