You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Overview
This release brings full Protocol V1 support for FANUC robots integrating with Roboception vision systems. This implementation is compatible with Roboception firmware 25.10 and later, featuring the standardized message protocol (54-byte request, 80-byte response) for reliable communication and consistent pose handling across all FANUC robot programs.
## What's New
**Standardized Protocol**
- Full alignment with GRI Protocol V1 specification
- Robust error handling with signed error codes
- Reliable job status tracking from vision system responses
- Compatible with Roboception firmware 25.10 and later
**Improved Pose Handling**
- Consistent world→flange frame convention across all programs
- Automatic frame computation with no robot configuration side-effects
- 1e6 precision scaling for accurate pose data
**Better Documentation**
- Clear integration guidelines for customers
- Frame convention documentation
- Updated examples with best practices
## Requirements
- Roboception firmware version 25.10 or later
- Generic Robot Interface license
Copy file name to clipboardExpand all lines: FANUC/README_FANUC.md
+55-25Lines changed: 55 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ This document describes the FANUC client implementation for Roboception's Generi
6
6
7
7
The FANUC GRI client provides a straightforward way to integrate Roboception vision capabilities into your FANUC robot programs. Instead of complex register manipulation, you can access vision functions through simple CALL statements and status checks.
8
8
9
+
**This integration uses the GRI protocol version defined by Roboception firmware 25.10 and later**
10
+
9
11
### Key Features
10
12
11
13
-**Vision Job Execution**: Trigger synchronous and asynchronous vision jobs
@@ -40,6 +42,7 @@ Load the following files onto your FANUC robot controller:
40
42
41
43
**TP Programs** (load .ls files):
42
44
-`GRI_OPEN_COMMUNICATION.LS` - System initialization
45
+
-`GRI_SETFRAMES.LS` - Utility to standardize frames (sets `UF:0` world and `UT:0` flange)
- On success: `R[150] = 0`; pose in `PR[53]`; counts in `R[152]/R[153]`
118
-
- No poses: `R[150] = 1`
119
-
- Errors: `R[150] < 0` (e.g., `-4` API_RESPONSE_ERROR; raw cause may be in `R[151]`)
120
-
- Confirmation calls (`GRI_TRIGGER_JOB_ASYNC`, `GRI_HEC_*`): `R[150] = 0` on success; otherwise `<0`error, with detail possibly in `R[151]`
121
+
- No poses: `R[150] = 1` (NO_POSES_FOUND)
122
+
- Errors: `R[150] < 0` (e.g., `-4` API_RESPONSE_ERROR; raw in `R[151]`)
123
+
- Confirmation calls (`GRI_TRIGGER_JOB_ASYNC`, `GRI_HEC_*`): `R[150] = 0` on success; on failure `R[150] < 0` with module/vendor detail in `R[151]`
121
124
- Status call (`GRI_GET_JOB_STATUS`): `R[150] = 0` on success; `R[152] = 1|2|3|4` → INACTIVE|RUNNING|DONE|FAILED
122
125
123
126
124
127
128
+
### Frame Convention
129
+
130
+
- KAREL always exchanges poses on the wire as world/base → flange (mm/deg).
131
+
- All LS examples standardize frames at program start by calling:
132
+
-`CALL GRI_SETFRAMES` (sets `UF:0` world and `UT:0` flange)
133
+
- Tool 0 must be the identity (flange). If Tool 0 was modified, correct it or transform poses accordingly.
134
+
135
+
Changing the convention (advanced):
136
+
- If you must use a different UF/UT, update `FANUC/TP/GRI_SETFRAMES.LS` accordingly, or manage frames yourself and remove the helper call from your program.
137
+
- Alternatively, keep world→flange in `PR[53]` and transform it to your chosen UF before moving.
138
+
125
139
### Simple Vision-Guided Picking
126
140
127
141
```fanuc
128
142
/PROG VISION_PICK_EXAMPLE
129
143
/MN
130
-
! Start vision system
144
+
! Standardize frames: UF:0 (world), UT:0 (flange)
145
+
CALL GRI_SETFRAMES ;
146
+
! Start GRI communication
131
147
CALL GRI_OPEN_COMMUNICATION ;
132
148
133
149
! Execute vision job
@@ -139,7 +155,9 @@ Optional example programs (load .ls files):
139
155
JMP LBL[cleanup] ;
140
156
141
157
LBL[pick_object] ;
142
-
! Move to detected pose (in PR[53])
158
+
! Move to detected pose (in PR[53]) using world/base and flange
159
+
UFRAME_NUM=0 ;
160
+
UTOOL_NUM=0 ;
143
161
L PR[53:gri pose] 200mm/sec FINE ;
144
162
! Execute gripper close
145
163
DO[1:Gripper]=ON ;
@@ -154,7 +172,6 @@ Optional example programs (load .ls files):
154
172
```fanuc
155
173
/PROG PROCESS_MULTIPLE_OBJECTS
156
174
/MN
157
-
CALL GRI_OPEN_COMMUNICATION ;
158
175
159
176
! Process objects until none remain
160
177
LBL[next_object] ;
@@ -183,7 +200,7 @@ Optional example programs (load .ls files):
183
200
### Asynchronous Processing
184
201
185
202
```fanuc
186
-
! Start vision job in background
203
+
! Start background job
187
204
CALL GRI_TRIGGER_JOB_ASYNC(1) ;
188
205
IF R[150:gri error code]<>0, JMP LBL[async_failed] ;
IF R[152:gri data 1]=2, JMP LBL[poll] ; -- RUNNING
197
-
IF R[152:gri data 1]<>3, JMP LBL[async_failed] ; -- not DONE
213
+
IF R[152:data 2]=2, JMP LBL[poll] ; -- RUNNING
214
+
IF R[152:data 2]<>3, JMP LBL[async_failed] ; -- not DONE
198
215
199
216
! Job is DONE → fetch results
200
217
LBL[next] ;
201
218
CALL GRI_GET_NEXT_GRASP(1) ;
202
219
IF R[150:gri error code]<>0, JMP LBL[finished] ;
220
+
UFRAME_NUM=0 ;
221
+
UTOOL_NUM=0 ;
203
222
L PR[53:gri pose] 150mm/sec FINE ;
204
223
IF R[152:gri data 1]>0, JMP LBL[next] ;
205
224
LBL[finished] ;
@@ -212,7 +231,13 @@ LBL[after] ;
212
231
213
232
## Status Codes
214
233
215
-
R[150] carries signed status: `<0` error, `0` ok, `>0` warning. For pose-returning calls, success (`0`) means a pose is available in `PR[53]`. For job status (`GRI_GET_JOB_STATUS`), `R[150]=0` on success and the job state is in `R[152]` (1..4).
234
+
`R[150]` semantics are uniform across functions:
235
+
236
+
-`R[150] = 0`: success
237
+
-`R[150] < 0`: error (see `R[151]` for module/vendor detail)
For job status (`GRI_GET_JOB_STATUS`): `R[150] = 0` on success and `R[152] ∈ {1,2,3,4}` → INACTIVE|RUNNING|DONE|FAILED.
216
241
217
242
## Hand-Eye Calibration
218
243
@@ -296,7 +321,7 @@ CALL GRI_QUIT ;
296
321
297
322
### No Objects Detected
298
323
299
-
- If the pose-returning call does not find a pose, `R[150]` will be `23` and `R[151] = 13` (no poses found). Check scene and job configuration.
324
+
- If the pose-returning call does not find a pose, `R[150]` will be `1` (NO_POSES_FOUND). Check scene and job configuration.
300
325
- Check scene lighting and part visibility
301
326
- Verify vision job configuration on vision system
302
327
- Confirm camera positioning and focus
@@ -310,12 +335,6 @@ The FANUC GRI client uses a layered architecture:
310
335
-**Background Module**: Compiled KAREL `.pc` (`gri_comm_background.pc`) handling socket/protocol and register bridging
311
336
-**TCP Socket**: Binary protocol communication with vision system
312
337
313
-
### Pose Frame Behavior
314
-
315
-
- The background module reads the current robot pose for protocol exchange as base (UF[0]) to flange (UT[0]).
316
-
- Implementation detail: it temporarily saves and sets `$MNUFRAMENUM[1]`/`$MNUTOOLNUM[1]` to `0` only for the `CURPOS(0,0)` call, then restores the previous values immediately. This guarantees a deterministic world→flange pose independent of the active user/tool frames.
317
-
- Future versions may replace this with a math-based conversion that avoids any temporary frame changes.
318
-
319
338
## Deployment Checklist
320
339
321
340
-[ ]`gri_comm_background.pc` loaded
@@ -353,14 +372,25 @@ Integrate GRI error handling with your existing error management:
353
372
354
373
```fanuc
355
374
CALL GRI_TRIGGER_JOB_SYNC(1) ;
356
-
SELECT R[150:gri error code] OF
357
-
CASE(20):
358
-
CALL PROCESS_OBJECT ;
359
-
CASE(23):
360
-
CALL HANDLE_VISION_ERROR ;
361
-
ENDSELECT ;
375
+
IF R[150:gri error code]=0, CALL PROCESS_OBJECT ;
376
+
IF R[150:gri error code]<0, CALL HANDLE_VISION_ERROR ;
377
+
IF R[150:gri error code]>0, CALL HANDLE_NO_POSE_OR_WARNING ;
362
378
```
363
379
364
-
Note: In this implementation, a "no object" situation is signaled as `R[150]=23` with `R[151]=13` (no poses found). Consider branching on `R[151]`to distinguish causes of errors if needed.
380
+
Note: A "no object" situation is signaled as `R[150]=1` (NO_POSES_FOUND). Consider branching on `R[151]`for module/vendor specific details when needed.
365
381
366
382
The system provides consistent, reliable communication with Roboception vision systems while maintaining the familiar FANUC programming environment.
0 commit comments