parallel_axis(x1, x2, x3, axis, ref)
Features
This function matches the normal vector of the plane consists of points(x1, x2, x3) based on the ref coordinate(refer to get_normal(x1, x2, x3)) and the designated axis of the tool frame. The current position is maintained as the TCP position of the robot.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
x1 | posx | - | posx or position list |
list (float[6]) | |||
x2 | posx | - | posx or position list |
list (float[6]) | |||
x3 | posx | - | posx or position list |
list (float[6]) | |||
axis | int | - | axis
|
ref | int | DR_BASE | reference coordinate
|
Return
Value | Description |
---|---|
0 | Success |
Negative value | Error |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
x0 = posx(0, 0, 90, 0, 90, 0)
movej(x0)
x1 = posx(0, 500, 700, 30, 0, 90)
x2 = posx(500, 0, 700, 0, 0, 45)
x3 = posx(300, 100, 500, 45, 0, 45)
parallel_axis(x1, x2, x3, DR_AXIS_X, DR_WORLD)
# match the tool x axis and the normal vector of the plane consists of points(x1,x2,x3) # based on the world coordinate