# gipick_mgr node interface document(robot <-> pc)
###### tags: `gipick_mgr`,`interface`, `node`, `robot`
###### verison: `3.9.0`
## Description
IsReady ->FindObject ->FindPath ->GetModelName ->GetModelIndex -> RunPathF -> RunPathB
GetTrajectoryNumber->GetTrajectoryPoints : 要回所有點
GetPathSize->GetWaypointIndex
### Command: IS_READY=0
詢問 gipick 主程式狀態是不是正常可以運作了, 例如:與 camera 的連線是否正常
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 0 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
:::info
Remark:
目前不一定要使用
:::
### Command: FIND_OBJ_C=5
開始進行 掃描, matching, 路徑規劃, 應該搭配 WAIT_OBJ_FOUND 使用, 才可以知道完成了沒
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 5 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
:::info
Remark:
非同步的
:::
### Command: WAIT_OBJ_FOUND=4
執行此 function 會卡住 , 直到 FIND_OBJ_C 找到解才會回傳值
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 4 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
### Command: GET_TRAJECTORY_NUMBER=301
取得所有規劃結果的路徑點位數量
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 301 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
| unsigned int | `number_of_points` | size of trajectory points |
### Command: GET_TRAJECTORY_POINTS=302
給定 trajectory index , 得到對應的 trajectory point 6 axis
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 302 |
| unsigned int | `index` | trajectory index |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
| float[6] | `pose` | 6 axis values |
### Command: SET_START_STATE=350
給定路徑規劃起始位置的 6 axis , 以決定從哪裡開始規劃
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 350 |
| float[6] | `joint` | start state 6 axis values |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
### Command: SET_SHOW_STATE=400
給定目前手臂 6 axis, gipick_ui 會顯示目前手臂姿態
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 400 |
| float[6] | `joint` | start state 6 axis values |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
### Command: GET_PATH_SIZE=500
得到 size of waypoints
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 500 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
| unsigned int | `number_of_points` | size of waypoints |
### Command: GET_WAIT_POINT_INDEX=501
給定 waypoints index, 會回傳對應的 trajectory index
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 501 |
| unsigned int | `index` | waypoints index |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
| unsigned int | `number_of_points` | get each waypoint segment trajectory index |
### Command: AIR_COUNTER=600
//deprecate
### Command: HAND_EYE_CALIBRATION_POSE=700
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 700 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
### Command: HAND_EYE_CALIBRATION=701
每到達一個要校正的位置, 給定目前 6 axis , gipick 將會記住此校正資訊
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 701 |
| float[6] | `joint` | current 6 axis values |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
### Command: GET_MODEL_NAME=800
取得目前要去夾取的 model name, path_index 以得知目前要去夾取的是哪種 model , 以及想用哪種方式夾取
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 800 |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| string | `empty` | `"return_code,model_name,path_index"` |
### Command: FIND_PATH=801
給定 start_state , 開始路徑規劃
#### Input
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `command` | 801 |
| float[6] | `joint` | start state 6 axis values |
#### Output
|型態 | 變數名 | 描述 |
| -------- | -------- | -- |
| unsigned int | `return_code` | 0 = 正常, 999 = command 長度不對 |
“