Skip to content

Commit

Permalink
chore(shared_data): add the v1.2 defs for gripper (#13172)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder authored and andySigler committed Jul 28, 2023
1 parent f2e9d00 commit 2568da6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/opentrons/config/gripper_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def info_num_to_model(num: str) -> GripperModel:
minor_model = num[2]
# we provisioned the some EVT grippers as 01 and some as 10
# DVT will now be 1.1
# PVT will now be 1.2
model_map = {
"0": {"0": GripperModel.v1, "1": GripperModel.v1},
"1": {"0": GripperModel.v1, "1": GripperModel.v1_1},
"1": {"0": GripperModel.v1, "1": GripperModel.v1_1, "2": GripperModel.v1_2},
}
return model_map[major_model][minor_model]

Expand Down
27 changes: 27 additions & 0 deletions shared-data/gripper/definitions/1/gripperV1.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$otSharedSchema": "gripper/schemas/1",
"model": "gripperV1.2",
"schemaVersion": 1,
"displayName": "Flex Gripper",
"gripForceProfile": {
"polynomial": [
[0, 4.1194669],
[1, 1.4181001],
[2, 0.0135956]
],
"defaultGripForce": 15.0,
"defaultHomeForce": 12.0,
"min": 2.0,
"max": 30.0
},
"geometry": {
"baseOffsetFromMount": [19.5, -74.325, -94.825],
"jawCenterOffsetFromBase": [0.0, 0.0, -86.475],
"pinOneOffsetFromBase": [6.0, -54.0, -98.475],
"pinTwoOffsetFromBase": [6.0, 54.0, -98.475],
"jawWidth": {
"min": 60.0,
"max": 92.0
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ class GripperModel(str, Enum):

v1 = "gripperV1"
v1_1 = "gripperV1.1"
v1_2 = "gripperV1.2"

def __str__(self) -> str:
"""Model name."""
enum_to_str = {
self.__class__.v1: "gripperV1",
self.__class__.v1_1: "gripperV1.1",
self.__class__.v1_2: "gripperV1.2",
}
return enum_to_str[self]

Expand Down

0 comments on commit 2568da6

Please sign in to comment.