griip-core-dev 0.5.6.dev25546__tar.gz
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.
- griip_core_dev-0.5.6.dev25546/.coverage +0 -0
- griip_core_dev-0.5.6.dev25546/PKG-INFO +12 -0
- griip_core_dev-0.5.6.dev25546/README.md +38 -0
- griip_core_dev-0.5.6.dev25546/project.json +86 -0
- griip_core_dev-0.5.6.dev25546/proto/griip.proto +473 -0
- griip_core_dev-0.5.6.dev25546/pyproject.toml +37 -0
- griip_core_dev-0.5.6.dev25546/scripts/generate_proto.py +70 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/generated/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/generated/griip_pb2.py +147 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/generated/griip_pb2.pyi +669 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/generated/griip_pb2_grpc.py +721 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/generated/griip_pb2_grpc.pyi +570 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/tests/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/tests/test_vrmcs_registration.py +179 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/vrmcs_client.py +1257 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/vrmcs_client.pyi +147 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/hardware/vrmcs_registration.py +129 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/py.typed +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/robot_drivers.py +6 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/utils/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/utils/joint_math.py +90 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/utils/tests/__init__.py +0 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/utils/tests/test_joint_math.py +116 -0
- griip_core_dev-0.5.6.dev25546/src/griip_core/utils/transforms.py +42 -0
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: griip-core-dev
|
|
3
|
+
Version: 0.5.6.dev25546
|
|
4
|
+
Summary: Dev build of griip-core from commit 0af7ee671 (PR #6192). Not a release.
|
|
5
|
+
Author: VentionCo
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Requires-Python: <3.13,>=3.10
|
|
8
|
+
Requires-Dist: grpcio>=1.78.0
|
|
9
|
+
Requires-Dist: numpy>=1.24
|
|
10
|
+
Requires-Dist: protobuf>=4.0
|
|
11
|
+
Requires-Dist: spatialmath-python<2.0.0,>=1.1.15
|
|
12
|
+
Requires-Dist: vention-grpc-py-sdk>=0.0.72
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# griip-core
|
|
2
|
+
|
|
3
|
+
Shared foundation for GRIIP, by [Vention](https://vention.com).
|
|
4
|
+
|
|
5
|
+
Holds the code that both the `mmai-griip-api` server and the `griip-sdk` client
|
|
6
|
+
need. The SDK talks to the API over gRPC, so neither can depend on the other.
|
|
7
|
+
Code both sides need lives here.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
The proto contract: `proto/griip.proto` and its committed generated stubs
|
|
12
|
+
(`griip_core.generated`). One definition of the five services (`GriipApiAdmin`,
|
|
13
|
+
`PlanningService`, `PerceptionService`, `PickingService`, `PlacingService`), so
|
|
14
|
+
server and client import the same stubs and the wire contract cannot drift.
|
|
15
|
+
|
|
16
|
+
Shared primitives:
|
|
17
|
+
|
|
18
|
+
- `utils/transforms.py`: SE3 and rotation-matrix math (`se3_to_pose_list`,
|
|
19
|
+
`normalize_rotation_matrix_to_se3`, `normalize_rotation_matrix_to_so3`).
|
|
20
|
+
- `utils/joint_math.py`: `normalize_joint_configurations_to_reference`, which
|
|
21
|
+
wraps joint angles to the value closest to a reference.
|
|
22
|
+
- `hardware/vrmcs_registration.py`: `find_compatible_registration` and
|
|
23
|
+
`adopt_existing_registration`, which reuse an existing VRMCS robot
|
|
24
|
+
registration instead of registering again.
|
|
25
|
+
|
|
26
|
+
That is the whole package. No orchestration, hardware clients, or calibration;
|
|
27
|
+
those stay in `griip-sdk`.
|
|
28
|
+
|
|
29
|
+
## Proto changes
|
|
30
|
+
|
|
31
|
+
Edit `proto/griip.proto`, then regenerate the stubs:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python scripts/generate_proto.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
CI runs `tools/check-griip-proto-stubs-current.py` and fails if the committed
|
|
38
|
+
stubs are stale.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "griip-core",
|
|
3
|
+
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"projectType": "library",
|
|
5
|
+
"sourceRoot": "projects/physical-ai/libs/griip-core/src",
|
|
6
|
+
"release": {
|
|
7
|
+
"version": {
|
|
8
|
+
"versionActions": "@nxlv/python/release/version-actions"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"targets": {
|
|
12
|
+
"generate-proto": {
|
|
13
|
+
"executor": "@nxlv/python:run-commands",
|
|
14
|
+
"options": {
|
|
15
|
+
"command": "uv run python scripts/generate_proto.py",
|
|
16
|
+
"cwd": "projects/physical-ai/libs/griip-core"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"proto-check": {
|
|
20
|
+
"executor": "@nxlv/python:run-commands",
|
|
21
|
+
"cache": true,
|
|
22
|
+
"inputs": [
|
|
23
|
+
"{projectRoot}/proto/griip.proto",
|
|
24
|
+
"{projectRoot}/scripts/generate_proto.py",
|
|
25
|
+
"{projectRoot}/src/griip_core/generated/**/*",
|
|
26
|
+
"{workspaceRoot}/tools/check-griip-proto-stubs-current.py"
|
|
27
|
+
],
|
|
28
|
+
"options": {
|
|
29
|
+
"command": "uv run python tools/check-griip-proto-stubs-current.py",
|
|
30
|
+
"cwd": "."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"test": {
|
|
34
|
+
"executor": "@nxlv/python:run-commands",
|
|
35
|
+
"cache": true,
|
|
36
|
+
"dependsOn": ["proto-check"],
|
|
37
|
+
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
38
|
+
"options": {
|
|
39
|
+
"commands": [
|
|
40
|
+
{
|
|
41
|
+
"command": "PYTHONPATH=./src uv run pytest src/ -v --cov=src/griip_core --cov-report=xml:../../../../coverage/projects/physical-ai/libs/griip-core/coverage.xml --cov-report=html:../../../../coverage/projects/physical-ai/libs/griip-core/html",
|
|
42
|
+
"forwardAllArgs": false
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"cwd": "{projectRoot}"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"lint": {
|
|
49
|
+
"executor": "@nxlv/python:run-commands",
|
|
50
|
+
"options": {
|
|
51
|
+
"cwd": "projects/physical-ai/libs/griip-core",
|
|
52
|
+
"commands": ["uv run ruff check src/", "uv run ruff format --check src/"],
|
|
53
|
+
"parallel": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"format": {
|
|
57
|
+
"executor": "@nxlv/python:run-commands",
|
|
58
|
+
"options": {
|
|
59
|
+
"command": "uv run ruff format src/",
|
|
60
|
+
"cwd": "projects/physical-ai/libs/griip-core"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"build": {
|
|
64
|
+
"executor": "@nxlv/python:build",
|
|
65
|
+
"outputs": ["{projectRoot}/dist"],
|
|
66
|
+
"options": {
|
|
67
|
+
"outputPath": "projects/physical-ai/libs/griip-core/dist",
|
|
68
|
+
"publish": false,
|
|
69
|
+
"lockedVersions": false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"upload-codecov": {
|
|
73
|
+
"executor": "nx:run-commands",
|
|
74
|
+
"options": {
|
|
75
|
+
"commands": ["bash tools/codecov-upload.sh griip-core coverage/projects/physical-ai/libs/griip-core/coverage.xml"]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"nx-release-publish": {
|
|
79
|
+
"executor": "nx:run-commands",
|
|
80
|
+
"options": {
|
|
81
|
+
"command": "npx tsx tools/python-publish-if-not-exists/src/python-publish-if-not-exists.ts --projectRoot={projectRoot} --dryRun={args.dryRun}"
|
|
82
|
+
},
|
|
83
|
+
"dependsOn": ["build"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package griip;
|
|
4
|
+
|
|
5
|
+
option java_multiple_files = true;
|
|
6
|
+
option java_package = "com.vention.griip";
|
|
7
|
+
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// GriipApiAdmin
|
|
10
|
+
//
|
|
11
|
+
// One-shot warm-up RPC. The API process starts idle (no yaml on disk, no env
|
|
12
|
+
// var) and rejects Pick/Plan/Place RPCs with UNAVAILABLE until Initialize
|
|
13
|
+
// returns OK. The SDK consumer calls Initialize from its app yaml's cell
|
|
14
|
+
// + active part. Calling Initialize a second time atomically swaps the
|
|
15
|
+
// subsystems for the new config (e.g. switching parts).
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
service GriipApiAdmin {
|
|
19
|
+
rpc Initialize (InitializeRequest) returns (InitializeResponse);
|
|
20
|
+
rpc StartPerceptionMcapRecording (StartPerceptionMcapRecordingRequest) returns (StartPerceptionMcapRecordingResponse);
|
|
21
|
+
rpc StopPerceptionMcapRecording (StopPerceptionMcapRecordingRequest) returns (StopPerceptionMcapRecordingResponse);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message McapRecordingConfig {
|
|
25
|
+
bool enabled = 1;
|
|
26
|
+
string output_dir = 2;
|
|
27
|
+
int32 max_duration_s = 3;
|
|
28
|
+
string filename_prefix = 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CameraCalibrationInput {
|
|
32
|
+
repeated double camera_intrinsics = 1;
|
|
33
|
+
int32 image_width = 2;
|
|
34
|
+
int32 image_height = 3;
|
|
35
|
+
string frame_id = 4;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message InitializeRequest {
|
|
39
|
+
MockConfig mocks = 1;
|
|
40
|
+
RobotConfig robot = 2;
|
|
41
|
+
PerceptionServicesConfig perception_services = 3;
|
|
42
|
+
PlannerConfig planner = 4;
|
|
43
|
+
GraspFilteringConfig grasp_filtering = 5;
|
|
44
|
+
PartConfig part = 6;
|
|
45
|
+
JointAngles home_joint_angles = 7;
|
|
46
|
+
repeated CollisionLineSegment collision_checking_line_segments = 8;
|
|
47
|
+
double simulated_delay_seconds = 9;
|
|
48
|
+
McapRecordingConfig perception_mcap = 10;
|
|
49
|
+
CameraCalibrationInput camera_calibration = 11;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message InitializeResponse {
|
|
53
|
+
enum Status {
|
|
54
|
+
STATUS_UNSPECIFIED = 0;
|
|
55
|
+
STATUS_OK = 1;
|
|
56
|
+
STATUS_INVALID_CONFIG = 2;
|
|
57
|
+
STATUS_BUILD_FAILED = 3;
|
|
58
|
+
}
|
|
59
|
+
Status status = 1;
|
|
60
|
+
string error_message = 2;
|
|
61
|
+
repeated double tcp_to_flange_offset = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message StartPerceptionMcapRecordingRequest {}
|
|
65
|
+
|
|
66
|
+
message StartPerceptionMcapRecordingResponse {
|
|
67
|
+
enum Status {
|
|
68
|
+
STATUS_UNSPECIFIED = 0;
|
|
69
|
+
STATUS_OK = 1;
|
|
70
|
+
STATUS_NOT_INITIALIZED = 2;
|
|
71
|
+
STATUS_NOT_CONFIGURED = 3;
|
|
72
|
+
}
|
|
73
|
+
Status status = 1;
|
|
74
|
+
string error_message = 2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message StopPerceptionMcapRecordingRequest {}
|
|
78
|
+
|
|
79
|
+
message StopPerceptionMcapRecordingResponse {
|
|
80
|
+
enum Status {
|
|
81
|
+
STATUS_UNSPECIFIED = 0;
|
|
82
|
+
STATUS_OK = 1;
|
|
83
|
+
}
|
|
84
|
+
Status status = 1;
|
|
85
|
+
string error_message = 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message MockConfig {
|
|
89
|
+
bool vamp = 1;
|
|
90
|
+
bool vrmcs_robot = 2;
|
|
91
|
+
bool collision_model = 3;
|
|
92
|
+
bool sam = 4;
|
|
93
|
+
bool foundation_pose = 5;
|
|
94
|
+
bool foundation_stereo = 6;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message RobotConfig {
|
|
98
|
+
string model = 1;
|
|
99
|
+
string driver = 2;
|
|
100
|
+
string vrmcs_url = 3;
|
|
101
|
+
string robot_ip = 4;
|
|
102
|
+
repeated double joint_lower_limits = 5;
|
|
103
|
+
repeated double joint_upper_limits = 6;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message PerceptionServicesConfig {
|
|
107
|
+
string sam_url = 1;
|
|
108
|
+
string foundation_pose_url = 2;
|
|
109
|
+
string foundation_stereo_url = 3;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message PlannerConfig {
|
|
113
|
+
string planner_name = 1;
|
|
114
|
+
int32 max_iterations = 2;
|
|
115
|
+
int32 max_samples = 3;
|
|
116
|
+
double range = 4;
|
|
117
|
+
bool dynamic_domain = 5;
|
|
118
|
+
double radius = 6;
|
|
119
|
+
bool start_tree_first = 7;
|
|
120
|
+
int32 simp_max_iterations = 8;
|
|
121
|
+
// Path to the static collision-cuboids JSON (the VAMP planning environment).
|
|
122
|
+
// Also sent via ConfigurePlanner; carried here so the perception MCAP logger
|
|
123
|
+
// can visualize the environment cuboids at recording start.
|
|
124
|
+
string cuboids_path = 9;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message GraspFilteringConfig {
|
|
128
|
+
double aggressive_angle_threshold_bin_floor_degrees = 1;
|
|
129
|
+
double aggressive_angle_threshold_gravity_axis_degrees = 2;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// `tcp_offset` is the [x,y,z] translation from the flange origin to the TCP;
|
|
133
|
+
// rotation is always identity in current cells, so we send the offset only.
|
|
134
|
+
// `grasp_definitions_json` is the raw contents of the part's grasps_<id>.json
|
|
135
|
+
// (the SDK reads the file locally and inlines it). Polymorphic schema
|
|
136
|
+
// (ExternalJawGrasp / InternalJawGrasp / ...) is preserved without bloating
|
|
137
|
+
// the proto with one field per subclass.
|
|
138
|
+
message PartConfig {
|
|
139
|
+
string part_id = 1;
|
|
140
|
+
string part_model_id = 2;
|
|
141
|
+
repeated double tcp_offset = 3;
|
|
142
|
+
string grasp_definitions_json = 4;
|
|
143
|
+
repeated CollisionSpheres held_object_collision_spheres = 5;
|
|
144
|
+
string mesh_path = 6;
|
|
145
|
+
// Object rotational symmetry, expanded server-side into FoundationPose
|
|
146
|
+
// symmetry transforms so a symmetric part resolves to one canonical pose.
|
|
147
|
+
// Unset = no symmetry (FoundationPose runs as before).
|
|
148
|
+
SymmetryConfig symmetry = 7;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Object symmetry used to canonicalize the estimated pose to one repeatable
|
|
152
|
+
// orientation downstream of FoundationPose (whose output is not repeatable for a
|
|
153
|
+
// symmetric part). `axes` lists object-frame 2-fold (180 deg) symmetry axes; three
|
|
154
|
+
// orthogonal axes describe a rectangular/cuboid part (D2 group). `expected_orientation`
|
|
155
|
+
// is the orientation the part is expected to rest at in the world; the pose is folded onto
|
|
156
|
+
// the symmetry representative closest to it. Unset = no canonicalization.
|
|
157
|
+
message SymmetryConfig {
|
|
158
|
+
repeated Vector3 axes = 1;
|
|
159
|
+
Quaternion expected_orientation = 2;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message CollisionLineSegment {
|
|
163
|
+
repeated double points = 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// PlanningService
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
service PlanningService {
|
|
171
|
+
rpc ConfigurePlanner (ConfigurePlannerRequest) returns (ConfigurePlannerResponse);
|
|
172
|
+
rpc PlanPath (PlanPathRequest) returns (PlanPathResponse);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
message ConfigurePlannerRequest {
|
|
176
|
+
string cuboids_path = 1;
|
|
177
|
+
string robot_model = 2;
|
|
178
|
+
string gripper_collision_spheres_path = 3;
|
|
179
|
+
optional string object_mesh_path = 4;
|
|
180
|
+
repeated double tcp_to_camera_transform = 5;
|
|
181
|
+
optional int32 planner_max_iterations = 6;
|
|
182
|
+
optional double planner_max_cost = 7;
|
|
183
|
+
repeated CollisionSpheres gripper_collision_spheres = 8;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
message ConfigurePlannerResponse {
|
|
187
|
+
string environment_id = 1;
|
|
188
|
+
int32 robot_dof = 2;
|
|
189
|
+
int32 num_cuboids_loaded = 3;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
message PlanPathRequest {
|
|
193
|
+
repeated double start_joint_angles = 1;
|
|
194
|
+
oneof target {
|
|
195
|
+
JointAngles target_joint_angles = 2;
|
|
196
|
+
Pose target_pose = 3;
|
|
197
|
+
}
|
|
198
|
+
bool linear = 4;
|
|
199
|
+
double velocity_scaling = 5;
|
|
200
|
+
double acceleration_scaling = 6;
|
|
201
|
+
repeated CollisionSpheres held_object_collision_spheres = 7;
|
|
202
|
+
repeated CollisionSpheres world_collision_spheres = 8;
|
|
203
|
+
optional bytes additional_point_clouds = 9;
|
|
204
|
+
optional double gripper_opening_width = 10;
|
|
205
|
+
repeated CollisionSpheres gripper_collision_spheres_override = 11;
|
|
206
|
+
optional bool normalize_to_start = 12;
|
|
207
|
+
repeated Cuboid cuboids = 13;
|
|
208
|
+
optional bool cuboids_replace_scene = 14;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
message PlanPathResponse {
|
|
212
|
+
bool success = 1;
|
|
213
|
+
optional string failure_reason = 2;
|
|
214
|
+
repeated JointAngles trajectory = 3;
|
|
215
|
+
optional double planning_time_ms = 4;
|
|
216
|
+
optional double path_cost = 5;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
// PerceptionService
|
|
221
|
+
// ---------------------------------------------------------------------------
|
|
222
|
+
|
|
223
|
+
service PerceptionService {
|
|
224
|
+
rpc EstimateDepth (EstimateDepthRequest) returns (EstimateDepthResponse);
|
|
225
|
+
rpc DetectObjects (DetectObjectsRequest) returns (DetectObjectsResponse);
|
|
226
|
+
rpc EstimatePose (EstimatePoseRequest) returns (EstimatePoseResponse);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
message EstimateDepthRequest {
|
|
230
|
+
bytes left_image = 1;
|
|
231
|
+
bytes right_image = 2;
|
|
232
|
+
repeated double camera_intrinsics = 3;
|
|
233
|
+
double stereo_baseline = 4;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
message EstimateDepthResponse {
|
|
237
|
+
bytes depth_data = 1;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
message DetectObjectsRequest {
|
|
241
|
+
string image_id = 1;
|
|
242
|
+
bytes color_image = 2;
|
|
243
|
+
bytes depth_image = 3;
|
|
244
|
+
repeated double camera_intrinsics = 4;
|
|
245
|
+
repeated double camera_pose_in_world = 5;
|
|
246
|
+
repeated BinWall bin_walls = 6;
|
|
247
|
+
repeated int32 roi = 7;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
message DetectObjectsResponse {
|
|
251
|
+
repeated DetectedObject detections = 1;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
message DetectedObject {
|
|
255
|
+
int32 index = 1;
|
|
256
|
+
bytes mask_data = 2;
|
|
257
|
+
int32 mask_height = 3;
|
|
258
|
+
int32 mask_width = 4;
|
|
259
|
+
repeated int32 bbox = 5;
|
|
260
|
+
double score = 6;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
message EstimatePoseRequest {
|
|
264
|
+
string image_id = 1;
|
|
265
|
+
bytes color_image = 2;
|
|
266
|
+
bytes depth_image = 3;
|
|
267
|
+
bytes object_mask = 4;
|
|
268
|
+
int32 mask_height = 5;
|
|
269
|
+
int32 mask_width = 6;
|
|
270
|
+
repeated double camera_intrinsics = 7;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
message EstimatePoseResponse {
|
|
274
|
+
bool success = 1;
|
|
275
|
+
Pose pose = 2;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ---------------------------------------------------------------------------
|
|
279
|
+
// PickingService
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
281
|
+
|
|
282
|
+
service PickingService {
|
|
283
|
+
rpc GeneratePicks (GeneratePicksRequest) returns (stream GeneratePicksResponse);
|
|
284
|
+
rpc ReportSelectedPick (ReportSelectedPickRequest) returns (ReportSelectedPickResponse);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
message ReportSelectedPickRequest {
|
|
288
|
+
string image_id = 1;
|
|
289
|
+
repeated double object_pose_in_world = 2;
|
|
290
|
+
repeated double prep_pose = 3;
|
|
291
|
+
int64 capture_timestamp_ns = 4;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
message ReportSelectedPickResponse {
|
|
295
|
+
bool ok = 1;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
message GeneratePicksRequest {
|
|
299
|
+
string image_id = 1;
|
|
300
|
+
bytes color_image = 2;
|
|
301
|
+
bytes depth_image = 3;
|
|
302
|
+
repeated double camera_intrinsics = 4;
|
|
303
|
+
repeated double camera_pose_in_world = 5;
|
|
304
|
+
repeated double tcp_pose_at_capture = 6;
|
|
305
|
+
JointAngles capture_joint_angles = 7;
|
|
306
|
+
repeated BinWall bin_walls = 8;
|
|
307
|
+
int32 max_detections = 9;
|
|
308
|
+
int32 max_picks_per_object = 10;
|
|
309
|
+
BinWall bin_floor = 11;
|
|
310
|
+
repeated int32 roi = 12;
|
|
311
|
+
int64 capture_timestamp_ns = 13;
|
|
312
|
+
// Per-phase end-effector collision spheres (flange frame), generated by the
|
|
313
|
+
// SDK's collision model. prep: all spheres, fingers closed. plunge: all
|
|
314
|
+
// spheres, fingers opened. scoop: all except fingertips, fingers opened.
|
|
315
|
+
// Empty => fall back to the spheres configured via ConfigurePlanner.
|
|
316
|
+
repeated CollisionSpheres prep_gripper_collision_spheres = 14;
|
|
317
|
+
repeated CollisionSpheres plunge_gripper_collision_spheres = 15;
|
|
318
|
+
repeated CollisionSpheres scoop_gripper_collision_spheres = 16;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
message GeneratePicksResponse {
|
|
322
|
+
oneof payload {
|
|
323
|
+
PickResultMessage pick_result = 1;
|
|
324
|
+
PickTerminalMessage terminal_message = 2;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
message PickResultMessage {
|
|
329
|
+
int32 pick_id = 1;
|
|
330
|
+
string grasp_name = 2;
|
|
331
|
+
repeated double object_pose_in_world = 4;
|
|
332
|
+
repeated double object_in_tcp = 5;
|
|
333
|
+
repeated double prep_pose = 6;
|
|
334
|
+
repeated double plunge_pose = 7;
|
|
335
|
+
repeated double scoop_pose = 8;
|
|
336
|
+
repeated JointAngles prep_trajectory = 9;
|
|
337
|
+
int32 priority = 10;
|
|
338
|
+
double distance_to_home = 11;
|
|
339
|
+
double retract_move_distance = 12;
|
|
340
|
+
// Grasp point with the tool rotation: where the TCP is when the gripper closes.
|
|
341
|
+
repeated double grasp_point_pose = 13;
|
|
342
|
+
int32 detected_object_index = 16;
|
|
343
|
+
oneof executor_params {
|
|
344
|
+
ParallelJawParams parallel_jaw = 20;
|
|
345
|
+
SuctionParams suction = 21;
|
|
346
|
+
ThreeFingerParams three_finger = 22;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
enum GraspMode {
|
|
351
|
+
GRASP_MODE_EXTERNAL = 0;
|
|
352
|
+
GRASP_MODE_INTERNAL = 1;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
message ScoopMotionParams {
|
|
356
|
+
double plunge_velocity = 1;
|
|
357
|
+
double scoop_velocity = 2;
|
|
358
|
+
double force_torque_sensor_threshold = 3;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
message ParallelJawParams {
|
|
362
|
+
GraspMode mode = 1;
|
|
363
|
+
int32 prep_width = 2;
|
|
364
|
+
int32 engaged_width = 3;
|
|
365
|
+
int32 grip_force = 4;
|
|
366
|
+
int32 grip_check_min_width = 5;
|
|
367
|
+
int32 grip_check_max_width = 6;
|
|
368
|
+
ScoopMotionParams scoop_motion = 7;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
message SuctionParams {
|
|
372
|
+
double vacuum_engage_threshold = 1;
|
|
373
|
+
ScoopMotionParams scoop_motion = 2;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
message ThreeFingerParams {
|
|
377
|
+
GraspMode mode = 1;
|
|
378
|
+
int32 grip_force = 2;
|
|
379
|
+
ScoopMotionParams scoop_motion = 3;
|
|
380
|
+
// IO-backed three-finger grippers (e.g. OnRobot 3FG15). When set, the SDK
|
|
381
|
+
// uses IOThreeFingerExecutor instead of the width-based ThreeFingerExecutor.
|
|
382
|
+
int32 prep_io_state = 4;
|
|
383
|
+
int32 engaged_io_state = 5;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
message PickTerminalMessage {
|
|
387
|
+
bool no_parts_detected = 1;
|
|
388
|
+
int32 total_picks_generated = 2;
|
|
389
|
+
bool has_only_ungraspable_objects = 3;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// ---------------------------------------------------------------------------
|
|
393
|
+
// PlacingService
|
|
394
|
+
// ---------------------------------------------------------------------------
|
|
395
|
+
|
|
396
|
+
service PlacingService {
|
|
397
|
+
rpc GeneratePlacement (GeneratePlacementRequest) returns (GeneratePlacementResponse);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
message GeneratePlacementRequest {
|
|
401
|
+
string image_id = 1;
|
|
402
|
+
bytes left_png = 2;
|
|
403
|
+
bytes depth_png = 3;
|
|
404
|
+
repeated double camera_intrinsics = 4;
|
|
405
|
+
repeated double tcp_to_camera = 5;
|
|
406
|
+
repeated double object_in_tcp = 6;
|
|
407
|
+
repeated double target_pose = 7;
|
|
408
|
+
repeated double planning_start_joint_angles = 8;
|
|
409
|
+
double max_object_diameter = 9;
|
|
410
|
+
repeated double axis_in_object_frame = 10;
|
|
411
|
+
int32 number_of_rotations = 11;
|
|
412
|
+
bool enable_in_hand_pose_estimation = 12;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
message GeneratePlacementResponse {
|
|
416
|
+
bool success = 1;
|
|
417
|
+
optional string failure_reason = 2;
|
|
418
|
+
repeated double refined_object_in_tcp = 3;
|
|
419
|
+
repeated PlacementIkSolution ik_solutions = 4;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
message PlacementIkSolution {
|
|
423
|
+
repeated double joint_angles = 1;
|
|
424
|
+
repeated double target_object_pose_in_world = 2;
|
|
425
|
+
double distance_to_start = 3;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
// Reusable sub-messages
|
|
430
|
+
// ---------------------------------------------------------------------------
|
|
431
|
+
|
|
432
|
+
message JointAngles {
|
|
433
|
+
repeated double values = 1;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
message Quaternion {
|
|
437
|
+
double w = 1;
|
|
438
|
+
double x = 2;
|
|
439
|
+
double y = 3;
|
|
440
|
+
double z = 4;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
message Vector3 {
|
|
444
|
+
double x = 1;
|
|
445
|
+
double y = 2;
|
|
446
|
+
double z = 3;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
message Pose {
|
|
450
|
+
Vector3 position = 1;
|
|
451
|
+
Quaternion orientation = 2;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
message CollisionSpheres {
|
|
455
|
+
Vector3 center = 1;
|
|
456
|
+
double radius = 2;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
message BinWall {
|
|
460
|
+
string name = 1;
|
|
461
|
+
double width_x = 2;
|
|
462
|
+
double width_y = 3;
|
|
463
|
+
double width_z = 4;
|
|
464
|
+
repeated double pose = 5;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
message Cuboid {
|
|
468
|
+
string name = 1;
|
|
469
|
+
double wx = 2;
|
|
470
|
+
double wy = 3;
|
|
471
|
+
double wz = 4;
|
|
472
|
+
repeated double pose = 5;
|
|
473
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
dependency-groups = { }
|
|
2
|
+
|
|
3
|
+
[project]
|
|
4
|
+
name = "griip-core-dev"
|
|
5
|
+
version = "0.5.6.dev25546"
|
|
6
|
+
description = "Dev build of griip-core from commit 0af7ee671 (PR #6192). Not a release."
|
|
7
|
+
requires-python = ">=3.10,<3.13"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"vention-grpc-py-sdk>=0.0.72",
|
|
10
|
+
"grpcio>=1.78.0",
|
|
11
|
+
"protobuf>=4.0",
|
|
12
|
+
"numpy>=1.24",
|
|
13
|
+
"spatialmath-python>=1.1.15,<2.0.0"
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[[project.authors]]
|
|
17
|
+
name = "VentionCo"
|
|
18
|
+
|
|
19
|
+
[project.license]
|
|
20
|
+
text = "Proprietary"
|
|
21
|
+
|
|
22
|
+
[build-system]
|
|
23
|
+
requires = [ "hatchling" ]
|
|
24
|
+
build-backend = "hatchling.build"
|
|
25
|
+
|
|
26
|
+
[tool.hatch.build.targets.wheel]
|
|
27
|
+
packages = [ "src/griip_core" ]
|
|
28
|
+
|
|
29
|
+
[tool.hatch.metadata]
|
|
30
|
+
allow-direct-references = true
|
|
31
|
+
|
|
32
|
+
[tool.ruff]
|
|
33
|
+
line-length = 140
|
|
34
|
+
extend-exclude = [ "src/griip_core/generated" ]
|
|
35
|
+
|
|
36
|
+
[tool.pytest.ini_options]
|
|
37
|
+
testpaths = [ "src" ]
|