@cobotar/protocol 0.16.11 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # CobotAR-Protocol
2
2
  A collection of protobuf messages for the CobotAR-project
3
3
 
4
- Current version: 0.16.11
4
+ Current version: 0.17.0
5
5
 
6
6
  ## Documentation
7
7
  Find it here: [documentation/README.md](documentation/README.md)
@@ -41,3 +41,178 @@ telemetry.robot.state.workcellA.robot-1
41
41
  event.robot.started.workcellA.robot-1
42
42
  event.plan.cancelled.workcellA.plan-P123
43
43
  ```
44
+
45
+
46
+ ## Conceptual design of Assembly processes
47
+ ### A. Product definition (What the thing is)
48
+ * Parts
49
+ * Assemblies / sub-assemblies
50
+ * Product BOM / hierarchy
51
+ * Part occurrences / instances
52
+ * CAD / 3D model references
53
+ * Mating / connection hints if you have them
54
+
55
+ ### B. Process template (How the thing is normally assembled)
56
+ * Process recipe
57
+ * Sequences / sub-sequences
58
+ * Tasks / operations / steps
59
+ * Preconditions / ordering / alternatives / variants
60
+ * Required tool roles, skill requirements, actor constraints
61
+ * Operator text
62
+
63
+ ### C. Execution instance (What is happening right now on the floor)
64
+ * Running process
65
+ * Current state of sequences/tasks
66
+ * Assigned human(s)/robot(s)
67
+ * Start/end timestamps
68
+ * Current station
69
+ * Evidence / completion / faults / overrides
70
+
71
+ ### D. Resource library (What can be used to perform the work)
72
+ * Humans
73
+ * Robots
74
+ * Tools
75
+ * Fixtures
76
+ * Assets
77
+ * Stations / cells
78
+ * Models
79
+
80
+ ### E. Capability layer (Why a given resource can or cannot do a task)
81
+ * Skills
82
+ * Capability profiles
83
+ * Tool roles
84
+ * Constraints
85
+ * Validity / training / retraining / calibration / certification
86
+
87
+ ## Distinguish type from instance
88
+ Example: Part. In assembly we usually need both:
89
+ * Part definition: “M4x12 screw”
90
+ * Part occurrence: “the third M4x12 screw in this assembly”
91
+
92
+ thus distinguishing between the two is important and must be supported and done consistently.
93
+
94
+
95
+ ### Minimal TaskDefinition example
96
+ ```typescript
97
+ TaskDefinition {
98
+ id: "task-fasten-cover-screw-1"
99
+ name: "Fasten cover screw 1"
100
+ instruction_text: "Fasten screw 1 to 0.8 Nm"
101
+ task_type: TASK_TYPE_FASTEN
102
+ target: {
103
+ target_node_id: "node-screw-1"
104
+ target_part_definition_id: "part-m4x12"
105
+ local_target: {
106
+ anchor_id: "node-screw-1"
107
+ }
108
+ }
109
+ tool_requirements: [{
110
+ role: TOOL_ROLE_APPLY_TORQUE,
111
+ required_properties: [TOOL_PROPERTY_TORQUE_CONTROLLED],
112
+ minimum_capability: {
113
+ min_torque_nm: 0.72,
114
+ max_torque_nm: 0.88
115
+ }
116
+ }]
117
+ skill_requirements: [{
118
+ skill_id: "SK-APPLY-CONTROLLED-TORQUE",
119
+ minimum_level: SKILL_LEVEL_QUALIFIED
120
+ }]
121
+ validation: {
122
+ require_tool_feedback: true
123
+ allow_manual_confirmation: true
124
+ manual_confirmation_min_level: SKILL_LEVEL_QUALIFIED
125
+ }
126
+ execution_policy: {
127
+ assignment_preference: TASK_ASSIGNMENT_PREFERENCE_EITHER
128
+ actor_constraint: {
129
+ allowed_actor_kinds: [ACTOR_KIND_HUMAN, ACTOR_KIND_ROBOT]
130
+ collaboration_mode: COLLABORATION_MODE_SEQUENTIAL_HRC
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+
137
+ ## Variant handling
138
+
139
+ ### Types of variants
140
+ #### Bucket A — Structural variants
141
+ Affect product tree. Modeled in product.
142
+
143
+ Examples:
144
+ * hinge side
145
+ * optional handle
146
+ * different fastener family
147
+ * extra sensor module
148
+
149
+ #### Bucket B — Workflow variants
150
+ Affect tasks/sequences/skills/tools/validation. Modeled in recipe applicability or recipe branching.
151
+
152
+ Examples:
153
+ * door must be flipped
154
+ * adhesive cure step required
155
+ * fragile part requires two-person lift
156
+ * robot can only assemble one orientation
157
+
158
+ #### Bucket C — Parametric variants
159
+ Do not change workflow structure. Passed at run-time.
160
+
161
+ Examples:
162
+ * color
163
+ * language
164
+ * customer text
165
+ * batch number
166
+ * cosmetic finish code
167
+
168
+ ### Handle variants without recipe explosion
169
+ For a product family, do this:
170
+
171
+ * **One ProductDefinition**
172
+ * Contains all structural possibilities.
173
+ * **Few ProcessRecipes**
174
+
175
+ Only split recipes where the workflow truly differs. For example:
176
+ * recipe-door-standard
177
+ * recipe-door-flipped-fixture
178
+ * recipe-door-adhesive
179
+
180
+ Not:
181
+ * red-left-short-handle
182
+ * red-left-long-handle
183
+ * blue-right-short-handle
184
+ * …
185
+
186
+ * **One ProcessRun per actual order/build**
187
+
188
+ Contains:
189
+ * selected product configuration
190
+ * runtime parameters
191
+
192
+ #### Example
193
+
194
+ ##### Product dimensions
195
+ * hinge_side = left | right
196
+ * color = red | green | blue
197
+ * handle = short | long
198
+
199
+ ##### Recipe
200
+ * `recipe-door-standard` is applicable when:
201
+ * handle = short or long
202
+ * color = any
203
+ * hinge_side = left
204
+ * `recipe-door-flipped` is applicable when:
205
+ * hinge_side = right
206
+
207
+ They need to be split into two recipes because `right-hinge` requires a `flip` operation and different fixture.
208
+
209
+ ##### Process run
210
+ When a real order starts the selection might look like this:
211
+ ```typescript
212
+ product_selection:
213
+ hinge_side = right
214
+ color = green
215
+ handle = long
216
+ ```
217
+ thus the system chooses the `recipe-door-flipped` recipe and the recipe stays the same regardless of `color`.
218
+
@@ -0,0 +1,141 @@
1
+ // @generated by protoc-gen-es v2.10.2 with parameter "target=ts,import_extension=ts"
2
+ // @generated from file assembly/v1/actor.proto (package assembly.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { ActorKind, CustomProperties, ExternalReference } from "./common_pb.ts";
8
+ import { file_assembly_v1_common } from "./common_pb.ts";
9
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
10
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
11
+ import type { Message } from "@bufbuild/protobuf";
12
+
13
+ /**
14
+ * Describes the file assembly/v1/actor.proto.
15
+ */
16
+ export const file_assembly_v1_actor: GenFile = /*@__PURE__*/
17
+ fileDesc("Chdhc3NlbWJseS92MS9hY3Rvci5wcm90bxILYXNzZW1ibHkudjEi4gEKEFdvcmtlckRlZmluaXRpb24SCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRIMCgRpY29uGAQgASgJEhAKCGRpc2FibGVkGAUgASgIEhMKC2VtcGxveWVlX2lkGAYgASgJEjsKE2V4dGVybmFsX3JlZmVyZW5jZXMYByADKAsyHi5hc3NlbWJseS52MS5FeHRlcm5hbFJlZmVyZW5jZRItCgZjdXN0b20YCCABKAsyHS5hc3NlbWJseS52MS5DdXN0b21Qcm9wZXJ0aWVzIkIKCEFjdG9yUmVmEiQKBGtpbmQYASABKA4yFi5hc3NlbWJseS52MS5BY3RvcktpbmQSEAoIYWN0b3JfaWQYAiABKAki6wEKD0FjdG9yQXNzaWdubWVudBIKCgJpZBgBIAEoCRIkCgVhY3RvchgCIAEoCzIVLmFzc2VtYmx5LnYxLkFjdG9yUmVmEhYKDnByb2Nlc3NfcnVuX2lkGAMgASgJEhcKD3NlcXVlbmNlX3J1bl9pZBgEIAEoCRITCgt0YXNrX3J1bl9pZBgFIAEoCRIvCgthc3NpZ25lZF9hdBgGIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLwoLcmVsZWFzZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQrABCg9jb20uYXNzZW1ibHkudjFCCkFjdG9yUHJvdG9QAVo7Z2l0aHViLmNvbS9jb2JvdGFyL3Byb3RvY29sL21lc3NhZ2VzL2Fzc2VtYmx5L3YxO2Fzc2VtYmx5djGiAgNBWFiqAhRNZXNzYWdlcy5Bc3NlbWJseS5WMcoCC0Fzc2VtYmx5XFYx4gIXQXNzZW1ibHlcVjFcR1BCTWV0YWRhdGHqAgxBc3NlbWJseTo6VjFiBnByb3RvMw", [file_assembly_v1_common, file_google_protobuf_timestamp]);
18
+
19
+ /**
20
+ * @generated from message assembly.v1.WorkerDefinition
21
+ */
22
+ export type WorkerDefinition = Message<"assembly.v1.WorkerDefinition"> & {
23
+ /**
24
+ * @generated from field: string id = 1;
25
+ */
26
+ id: string;
27
+
28
+ /**
29
+ * @generated from field: string name = 2;
30
+ */
31
+ name: string;
32
+
33
+ /**
34
+ * @generated from field: string description = 3;
35
+ */
36
+ description: string;
37
+
38
+ /**
39
+ * @generated from field: string icon = 4;
40
+ */
41
+ icon: string;
42
+
43
+ /**
44
+ * @generated from field: bool disabled = 5;
45
+ */
46
+ disabled: boolean;
47
+
48
+ /**
49
+ * @generated from field: string employee_id = 6;
50
+ */
51
+ employeeId: string;
52
+
53
+ /**
54
+ * @generated from field: repeated assembly.v1.ExternalReference external_references = 7;
55
+ */
56
+ externalReferences: ExternalReference[];
57
+
58
+ /**
59
+ * @generated from field: assembly.v1.CustomProperties custom = 8;
60
+ */
61
+ custom?: CustomProperties;
62
+ };
63
+
64
+ /**
65
+ * Describes the message assembly.v1.WorkerDefinition.
66
+ * Use `create(WorkerDefinitionSchema)` to create a new message.
67
+ */
68
+ export const WorkerDefinitionSchema: GenMessage<WorkerDefinition> = /*@__PURE__*/
69
+ messageDesc(file_assembly_v1_actor, 0);
70
+
71
+ /**
72
+ * @generated from message assembly.v1.ActorRef
73
+ */
74
+ export type ActorRef = Message<"assembly.v1.ActorRef"> & {
75
+ /**
76
+ * @generated from field: assembly.v1.ActorKind kind = 1;
77
+ */
78
+ kind: ActorKind;
79
+
80
+ /**
81
+ * worker_definition_id or robot_instance_id
82
+ *
83
+ * @generated from field: string actor_id = 2;
84
+ */
85
+ actorId: string;
86
+ };
87
+
88
+ /**
89
+ * Describes the message assembly.v1.ActorRef.
90
+ * Use `create(ActorRefSchema)` to create a new message.
91
+ */
92
+ export const ActorRefSchema: GenMessage<ActorRef> = /*@__PURE__*/
93
+ messageDesc(file_assembly_v1_actor, 1);
94
+
95
+ /**
96
+ * @generated from message assembly.v1.ActorAssignment
97
+ */
98
+ export type ActorAssignment = Message<"assembly.v1.ActorAssignment"> & {
99
+ /**
100
+ * @generated from field: string id = 1;
101
+ */
102
+ id: string;
103
+
104
+ /**
105
+ * @generated from field: assembly.v1.ActorRef actor = 2;
106
+ */
107
+ actor?: ActorRef;
108
+
109
+ /**
110
+ * @generated from field: string process_run_id = 3;
111
+ */
112
+ processRunId: string;
113
+
114
+ /**
115
+ * @generated from field: string sequence_run_id = 4;
116
+ */
117
+ sequenceRunId: string;
118
+
119
+ /**
120
+ * @generated from field: string task_run_id = 5;
121
+ */
122
+ taskRunId: string;
123
+
124
+ /**
125
+ * @generated from field: google.protobuf.Timestamp assigned_at = 6;
126
+ */
127
+ assignedAt?: Timestamp;
128
+
129
+ /**
130
+ * @generated from field: google.protobuf.Timestamp released_at = 7;
131
+ */
132
+ releasedAt?: Timestamp;
133
+ };
134
+
135
+ /**
136
+ * Describes the message assembly.v1.ActorAssignment.
137
+ * Use `create(ActorAssignmentSchema)` to create a new message.
138
+ */
139
+ export const ActorAssignmentSchema: GenMessage<ActorAssignment> = /*@__PURE__*/
140
+ messageDesc(file_assembly_v1_actor, 2);
141
+