Definition
get_current_posx(ref, ori_type)
Features
Returns the pose and solution space of the current task coordinate. The pose is based on the ref coordinate.
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
ref |
Int |
DR_BASE |
reference coordinate
|
|
ori_type |
int |
DR_ELR_ZYZ |
orientation type
|
Note
-
ref: DR_BASE (base coordinate)/user coordinate (globally declared user coordinate)
-
DR_BASE is applied when ref is omitted.
Return
|
Value |
Description |
|---|---|
|
Posx |
Task space point |
|
Int |
Solution space (0 ~ 7) |
Solution Space w.r.t. Robot Configuration
|
Solution space |
Binary |
Shoulder |
Elbow |
Wrist |
|---|---|---|---|---|
|
0 |
000 |
Lefty |
Below |
No Flip |
|
1 |
001 |
Lefty |
Below |
Flip |
|
2 |
010 |
Lefty |
Above |
No Flip |
|
3 |
011 |
Lefty |
Above |
Flip |
|
4 |
100 |
Righty |
Below |
No Flip |
|
5 |
101 |
Righty |
Below |
Flip |
|
6 |
110 |
Righty |
Above |
No Flip |
|
7 |
111 |
Righty |
Above |
Flip |
Exception
|
Exception |
Description |
|---|---|
|
DR_Error (DR_ERROR_RUNTIME) |
C extension module error occurred |
Example
x1, sol = get_current_posx() #x1 w.r.t. DR_BASE
x1_wld, sol = get_current_posx(ref=DR_WORLD) #x1 w.r.t. DR_WORLD
DR_USR1=set_user_cart_coord(x1, x2, x3, pos)
set_ref_coord(DR_USR1)
x1, sol = get_current_posx(DR_USR1) #x1 w.r.t. DR_USR1
x2, sol = get_current_posx(DR_USR1, DR_FIX_XYZ) #x2 w.r.t. DR_USR1 (orientation type: fixed xyz)