Breadcrumbs

CDRFLEx.align_axis(fTargetPos1, fTargetPos2, fTargetPos3, fSourceVec, eTaskAxis, eTargetRef)

Features

This function matches the normal vector of the plane consists of points(fTargetPos1, fTargetPos2, fTargetPos3) based on the ref coordinate(eTargetRef)) and the designated axis of the tool frame. The robot TCP moves to the pos position.

Parameter

Parameter Name

Data Type

Default Value

Description

fTargetPos1

float[6]

-

Target task location for six axes

fTargetPos2

float[6]


Target task location for six axes

fTargetPos3

float[6]


Target task location for six axes

fSourceVec

float[3]


vector

eTaskAxis

enum.TASK_AXIS

-

Refer to the Definition of Constant and Enumeration Type

eTargetRef

enum.COORDINATE_SYSTEM

-

Refer to the Definition of Constant and Enumeration Type

Return

Value

Description

0

Failed

1

Success

Example

C++
float x1[6] = {0, 500, 700, 30, 0, 0};                
float x2[6] = {500, 0, 700, 0, 0, 0};                 
float x3[6] = {300, 100, 500, 0, 0, 0};                
float pos[3] = {400, 400, 500};
Drfl.align_axis(x1, x2, x3, pos, TASK_AXIS_X, COORDINATE_SYSTEM_BASE);