Skip to content

Commit

Permalink
Update schema to match the latest version of the AMR interop standard…
Browse files Browse the repository at this point in the history
… (May 2022) (#24)

* Update schema to latest version

* Rename planarDatum to planarDatumUUID

* Remove planarDatum from velocity

* Fix issue with click dependency

* Apply formatting with black
  • Loading branch information
FlorGrosso authored May 19, 2022
1 parent b5f77b4 commit c3921bf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ repos:
rev: 21.7b0
hooks:
- id: black
additional_dependencies: ['click==8.0.4']
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ def _callback_twist_stamped_msg(self, param_name, msg_field, data):
"z": quat[2],
"w": quat[3],
},
"planarDatum": frame_id,
}

def _callback_string_msg(self, param_name, msg_field, data):
Expand Down Expand Up @@ -331,7 +330,7 @@ def _callback_path_msg(self, param_name, msg_field, data):
"z": pose_orientation.z,
"w": pose_orientation.w,
},
"planarDatum": self._get_frame_id_from_header(pose),
"planarDatumUUID": self._get_frame_id_from_header(pose),
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"w": {
"type": "number"
}
}
},
"additionalProperties": false
},
"location": {
"description": "Location of an object or AMR",
Expand Down Expand Up @@ -50,9 +51,11 @@
"planarDatum": {
"description": "Id of planarDatum AMR is referencing",
"type": "string",
"format": "uuid"
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
}
}
},
"additionalProperties": false
},
"predictedLocation": {
"description": "Predicted future location of an object or AMR",
Expand Down Expand Up @@ -85,8 +88,10 @@
"planarDatumUUID": {
"description": "Only necessary if different from AMRs current planarDatum",
"type": "string",
"format": "uuid"
}
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"additionalProperties": false
}
}
},
Expand All @@ -104,7 +109,8 @@
"uuid": {
"description": "UUID specified by RFC4122 that all subsequent messages should reference",
"type": "string",
"format": "uuid"
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"timestamp": {
"type": "string",
Expand Down Expand Up @@ -138,7 +144,8 @@
"type": "number",
"default": 0
}
}
},
"additionalProperties": false
},
"maxSpeed": {
"description": "Max robot speed in m/s",
Expand Down Expand Up @@ -196,13 +203,15 @@
"type": "number",
"default": 0
}
}
},
"additionalProperties": false
},
"cargoMaxWeight": {
"description": "Max weight of cargo in kg",
"type": "string"
}
}
},
"additionalProperties": false
},
"statusReport": {
"type": "object",
Expand All @@ -216,7 +225,8 @@
"uuid": {
"description": "UUID specified in the identityAndCapability message",
"type": "string",
"format": "uuid"
"format": "uuid",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"timestamp": {
"type": "string",
Expand All @@ -231,9 +241,11 @@
"disabled",
"offline",
"charging",
"waiting",
"waitingHumanEvent",
"waitingExternalEvent",
"waitingInternalEvent",
"loadingUnloading",
"manualOveride"
"manualOverride"
]
},
"location": {
Expand All @@ -255,13 +267,14 @@
"description": "Angular velocity in quaternions per second",
"$ref": "#/definitions/quaternion"
}
}
},
"additionalProperties": false
},
"batteryPercentage": {
"description": "Percentage of battery remaining",
"type": "number",
"minimum": 0,
"inclusiveMaximum": 100
"maximum": 100
},
"remainingRunTime": {
"description": "Estimated remaining runtime in hours",
Expand All @@ -272,7 +285,7 @@
"description": "Percentage of capacity still available",
"type": "number",
"minimum": 0,
"inclusiveMaximum": 100
"maximum": 100
},
"errorCodes": {
"description": "List of current error states - should be omitted for normal operation",
Expand Down Expand Up @@ -300,7 +313,8 @@
"maxItems": 10,
"uniqueItems": true
}
}
},
"additionalProperties": false
},
"oneOf": [
{
Expand Down

0 comments on commit c3921bf

Please sign in to comment.