observations/state
includes location and state (e.g. health) of each player
header
| Field | Type | Required | Allowed values | Description |
|---|---|---|---|---|
| timestamp | string | ✓ | ||
| message_type | string | ✓ | observation |
|
| version | string | ✓ | The message format version |
msg
| Field | Type | Required | Allowed values | Description |
|---|---|---|---|---|
| experiment_id | string | ✓ | ||
| trial_id | string | |||
| timestamp | string | ✓ | ||
| source | string | ✓ | ||
| sub_type | string | ✓ | state |
|
| version | string | ✓ | ||
| replay_parent_type | string|null | TRIAL REPLAY null |
||
| replay_parent_id | string|null | |||
| replay_id | string|null |
data
| Field | Type | Required | Allowed values | Description |
|---|---|---|---|---|
| mission_timer | string | ✓ | ||
| elapsed_milliseconds | number | ✓ | ||
| observation_number | integer | ✓ | ||
| timestamp | string | ✓ | ||
| participant_id | string | ✓ | ||
| playername | string | |||
| x | number | ✓ | ||
| y | number | ✓ | ||
| z | number | ✓ | ||
| pitch | number | ✓ | ||
| yaw | number | ✓ | ||
| world_time | integer | ✓ | ||
| total_time | integer | ✓ | ||
| entity_type | string | ✓ | ||
| id | string | ✓ | ||
| motion_x | number | ✓ | ||
| motion_y | number | ✓ | ||
| motion_z | number | ✓ | ||
| life | number | ✓ |
Example message
{"header": {
"timestamp": "2019-12-26T12:47:23.1234Z",
"message_type": "observation",
"version": "0.4"
},
"msg": {
"experiment_id": "563e4567-e89b-12d3-a456-426655440000",
"trial_id": "123e4567-e89b-12d3-a456-426655440000",
"timestamp": "2019-12-26T14:05:02.1412Z",
"source": "simulator",
"sub_type": "state",
"version": "1.1"},
"data": {
"mission_timer":"8 : 36",
"elapsed_milliseconds": 15113,
"observation_number":6857,
"timestamp":"2019-12-18T19:13:46.1452Z",
"world_time":12000,
"total_time":6706346,
"entity_type": "human",
"yaw":19.6875,
"x":-2198.91357421875,
"y":23.0,
"z":193.04052734375,
"pitch":4.21875,
"id":"699ba7c4-ceaf-3c46-a3cf-50b02c2ff935",
"motion_x":0.08991309562755659,
"motion_y":0.0,
"motion_z":-0.11381933207744127,
"life":20.0,
"participant_id":"E000324"
}
}Raw JSON Schema (resolved)
{
"$id": "http://asist.aptima.com/schemas/observation_state.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {},
"properties": {
"data": {
"$id": "#/properties/data",
"properties": {
"elapsed_milliseconds": {
"$id": "#/properties/event/state/elapsed_milliseconds",
"examples": [
5000,
77459,
689457
],
"pattern": "^[0-9]+$",
"title": "The Elapsed Milliseconds Schema",
"type": "number"
},
"entity_type": {
"$id": "#/properties/data/properties/entity_type",
"Enum": [
"human",
"agent"
],
"default": "",
"examples": [
"human"
],
"title": "The Entity Type Schema",
"type": "string"
},
"id": {
"$id": "#/properties/data/properties/id",
"default": "",
"examples": [
"699ba7c4-ceaf-3c46-a3cf-50b02c2ff935"
],
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"title": "The Id Schema",
"type": "string"
},
"life": {
"$id": "#/properties/data/properties/life",
"default": 0.0,
"examples": [
20.0
],
"title": "The Life Schema",
"type": "number"
},
"mission_timer": {
"$id": "#/properties/event/state/mission_timer",
"examples": [
"8 : 36"
],
"pattern": "(^([0-9]*? : [+0-9]*?)$)|(^Mission Timer not initialized\\.$)",
"title": "The Mission Timer Schema",
"type": "string"
},
"motion_x": {
"$id": "#/properties/data/properties/motion_x",
"default": 0.0,
"examples": [
0.08991309562755659
],
"title": "The Motionx Schema",
"type": "number"
},
"motion_y": {
"$id": "#/properties/data/properties/motion_y",
"default": 0.0,
"examples": [
0.5
],
"title": "The Motion Y Schema",
"type": "number"
},
"motion_z": {
"$id": "#/properties/data/properties/motion_z",
"default": 0.0,
"examples": [
-0.11381933207744127
],
"title": "The Motionz Schema",
"type": "number"
},
"observation_number": {
"$id": "#/properties/data/properties/observation_number",
"default": 0,
"examples": [
6857
],
"title": "The Observation Number Schema",
"type": "integer"
},
"participant_id": {
"$id": "#/properties/data/properties/participant_id",
"default": "",
"examples": [
"E000231"
],
"pattern": "^(.*)$",
"title": "The participant_id Schema",
"type": "string"
},
"pitch": {
"$id": "#/properties/data/properties/pitch",
"default": 0.0,
"examples": [
0.0
],
"title": "The Pitch Schema",
"type": "number"
},
"playername": {
"$id": "#/properties/data/properties/playername",
"default": "",
"examples": [
"Ed"
],
"pattern": "^(.*)$",
"title": "The playerName Schema",
"type": "string"
},
"timestamp": {
"$id": "#/properties/data/properties/timestamp",
"default": "",
"examples": [
"2019-12-18 19:13:46.145219Z"
],
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
"title": "The Timestamp Schema",
"type": "string"
},
"total_time": {
"$id": "#/properties/data/properties/total_time",
"default": 0,
"examples": [
6706346
],
"title": "The Total Time Schema",
"type": "integer"
},
"world_time": {
"$id": "#/properties/data/properties/world_time",
"default": 0,
"examples": [
12000
],
"title": "The Worldtime Schema",
"type": "integer"
},
"x": {
"$id": "#/properties/data/properties/x",
"default": 0.0,
"examples": [
-2194.8933503172193
],
"title": "The X Schema",
"type": "number"
},
"y": {
"$id": "#/properties/data/properties/y",
"default": 0.0,
"examples": [
24.0
],
"title": "The Y Schema",
"type": "number"
},
"yaw": {
"$id": "#/properties/data/properties/yaw",
"default": 0.0,
"examples": [
0.4
],
"title": "The Yaw Schema",
"type": "number"
},
"z": {
"$id": "#/properties/data/properties/z",
"default": 0.0,
"examples": [
190.33727
],
"title": "The Z Schema",
"type": "number"
}
},
"required": [
"mission_timer",
"elapsed_milliseconds",
"observation_number",
"timestamp",
"entity_type",
"x",
"y",
"z",
"pitch",
"yaw",
"world_time",
"total_time",
"id",
"motion_x",
"motion_y",
"motion_z",
"life",
"participant_id"
],
"title": "The Observation State Data Schema",
"type": "object"
},
"header": {
"$id": "http://asist.aptima.com/schemas/common_header.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {},
"properties": {
"message_type": {
"$id": "#/properties/message_type",
"const": "observation",
"enum": [
"control",
"observation",
"chat",
"status",
"trial",
"event",
"groundtruth",
"experiment",
"metadata",
"agent"
],
"examples": [
"observation"
],
"pattern": "^([a-z_]*?)$",
"title": "The Message_type Schema",
"type": "string"
},
"timestamp": {
"$id": "#/properties/timestamp",
"examples": [
"2019-12-26T12:47:23.1234Z"
],
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
"title": "The Timestamp Schema",
"type": "string"
},
"version": {
"$id": "#/properties/version",
"examples": [
"1.0",
"2.3.1"
],
"pattern": "^([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$",
"title": "The message format version",
"type": "string"
}
},
"required": [
"timestamp",
"message_type",
"version"
],
"title": "ASIST message common header Schema",
"type": "object",
"version": "0.3"
},
"msg": {
"$id": "http://asist.aptima.com/schemas/event_message.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {},
"properties": {
"experiment_id": {
"$id": "#/properties/experiment_id",
"default": "",
"examples": [
"123e4567-e89b-12d3-a456-426655440000"
],
"pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|Null|null)",
"title": "The Experiment Id Schema",
"type": "string"
},
"replay_id": {
"$id": "#/properties/replay_id",
"default": "",
"examples": [
"123e4567-e89b-12d3-a456-426655440000"
],
"pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
"title": "The Replay Id Schema",
"type": [
"string",
"null"
]
},
"replay_parent_id": {
"$id": "#/properties/replay_parent_id",
"default": "",
"examples": [
"123e4567-e89b-12d3-a456-426655440000"
],
"pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
"title": "The Replay Parent Id Schema",
"type": [
"string",
"null"
]
},
"replay_parent_type": {
"$id": "#/properties/replay_parent_type",
"enum": [
"TRIAL",
"REPLAY",
null
],
"title": "The Replay Parent Type Schema",
"type": [
"string",
"null"
]
},
"source": {
"$id": "#/properties/source",
"default": "",
"examples": [
"simulator"
],
"pattern": "^(.*)$",
"title": "The Source Schema",
"type": "string"
},
"sub_type": {
"$id": "#/properties/sub_type",
"const": "state",
"default": "",
"examples": [
"equip",
"triage"
],
"pattern": "^([a-zA-Z0-9_:]*?)$",
"title": "The Sub Type Schema",
"type": "string"
},
"timestamp": {
"$id": "#/properties/timestamp",
"default": "",
"examples": [
"2019-12-26T14:05:02.3412Z"
],
"pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
"title": "The Timestamp Schema",
"type": "string"
},
"trial_id": {
"$id": "#/properties/trial_id",
"default": "",
"examples": [
"123e4567-e89b-12d3-a456-426655440000"
],
"pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
"title": "The Trial Id Schema",
"type": "string"
},
"version": {
"$id": "#/properties/version",
"default": "",
"examples": [
"0.1",
"1.0.1"
],
"pattern": "^([.]*)|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"title": "The Version Schema",
"type": "string"
}
},
"required": [
"experiment_id",
"timestamp",
"source",
"sub_type",
"version"
],
"title": "The Event Message Schema",
"type": "object",
"version": "0.5"
}
},
"required": [
"header",
"msg",
"data"
],
"title": "The Observation State Schema",
"type": "object",
"version": "1.1"
}Upstream spec documentation
Data Subtype: Player State Message Format
This data message subtype is used to communicate player location and state information from the simulator to any component on the message bus that is interested in it.
TOPIC
observations/state
Message Fields
| Field Name | Type | Description |
|---|---|---|
| header | object | From Common Header Format section |
| msg | object | From the Common Event Message Format section |
| data.mission_timer | string | the mission time of the event |
| data.elapsed_milliseconds | number | the number of elapsed milliseconds since mission start |
| data.observation_number | integer | A sequence number of the number of observations from the beginning of the trial run |
| data.timestamp | string | timestamp of when the data was captured. UTC timezone formatted as ISO 8601: YYYY-MM-DDThh:mm:ss.ssssZ |
| data.world_time | integer | Current time in ticks |
| data.total_time | integer | Total world time, unaffected by ServerInitialConditions |
| data.entity_type | string | The type of the entity e.g. "human" |
| data.yaw | float | The current yaw of the entity's direction. Yaw has a range -360 to +360. |
| data.x | float | The current x location of the entity |
| data.y | float | The current y location of the entity |
| data.z | float | The current z location of the entity |
| data.pitch | float | The current pitch of the entity's direction |
| data.id | string | A UUID format unique identifier for the entity |
| data.motion_x | float | The x direction motion of the entity. The delta change in position since the last observation in the x direction. |
| data.motion_y | float | The y direction motion of the entity. The delta change in position since the last observation in the y direction. |
| data.motion_z | float | The z direction motion of the entity. The delta change in position since the last observation in the z direction. |
| data.life | float | The current life value for the entity |
| data.playername | string | [Deprecated]The name of the entity |
| data.participant_id | string | the participant id of the player being reported |
Message Example
{"header": {
"timestamp": "2019-12-26T12:47:23.1234Z",
"message_type": "observation",
"version": "0.4"
},
"msg": {
"experiment_id": "563e4567-e89b-12d3-a456-426655440000",
"trial_id": "123e4567-e89b-12d3-a456-426655440000",
"timestamp": "2019-12-26T14:05:02.1412Z",
"source": "simulator",
"sub_type": "state",
"version": "1.1"},
"data": {
"mission_timer":"8 : 36",
"elapsed_milliseconds": 15113,
"observation_number":6857,
"timestamp":"2019-12-18T19:13:46.1452Z",
"world_time":12000,
"total_time":6706346,
"entity_type": "human",
"yaw":19.6875,
"x":-2198.91357421875,
"y":23.0,
"z":193.04052734375,
"pitch":4.21875,
"id":"699ba7c4-ceaf-3c46-a3cf-50b02c2ff935",
"motion_x":0.08991309562755659,
"motion_y":0.0,
"motion_z":-0.11381933207744127,
"life":20.0,
"participant_id":"E000324"
}
}
CHANGE HISTORY
VERSION | DATE | DETAILS | --- | --- | --- | | 1.1 | 8/13/2021 | deprecated playername and added participant_id |