Locations

Locations are the data structures that represent physical locations in the space of a fleet. Locations can be defined in many ways (transforms, objects, coordinates, etc.) and relative to many other entites.

Tip

Many locations use the tcode_api.types.Matrix structure to represent 3D transforms. To create these easily, see tcode_api.utilities.create_transform method.

Documentation

TCode location schemas.

pydantic model tcode_api.schemas.location.LocationAsLabwareHolder

Location specified by a labware holder’s name.

Show JSON schema
{
   "title": "LocationAsLabwareHolder",
   "description": "Location specified by a labware holder's name.",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationAsLabwareHolder",
         "default": "LocationAsLabwareHolder",
         "title": "Type",
         "type": "string"
      },
      "robot_id": {
         "description": "ID of the robot on which the labware holder is located.",
         "title": "Robot Id",
         "type": "string"
      },
      "labware_holder_name": {
         "description": "Name of the labware holder, as defined in the robot's configuration. Most often, this will be a deck slot in the format \"DeckSlot_#\".",
         "title": "Labware Holder Name",
         "type": "string"
      }
   },
   "required": [
      "robot_id",
      "labware_holder_name"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • labware_holder_name (str)

  • robot_id (str)

  • schema_version (Literal[1])

  • type (Literal['LocationAsLabwareHolder'])

field type: Literal['LocationAsLabwareHolder'] = 'LocationAsLabwareHolder'
field schema_version: Literal[1] = 1
field robot_id: str [Required]

ID of the robot on which the labware holder is located.

field labware_holder_name: str [Required]

Name of the labware holder, as defined in the robot’s configuration. Most often, this will be a deck slot in the format “DeckSlot_#”.

pydantic model tcode_api.schemas.location.LocationAsLabwareIndex

Location specifed as a specific feature of a Labware (ex. bottom of well A1).

Show JSON schema
{
   "title": "LocationAsLabwareIndex",
   "description": "Location specifed as a specific feature of a Labware (ex. bottom of well A1).",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationAsLabwareIndex",
         "default": "LocationAsLabwareIndex",
         "title": "Type",
         "type": "string"
      },
      "labware_id": {
         "description": "TCode ID of the labware to target, assigned previously by the :class:``ADD_LABWARE`` command.",
         "title": "Labware Id",
         "type": "string"
      },
      "location_index": {
         "description": "Index into labware \"slots\". In a 96-well plate, for example, this index operates in row-major order (A1 is 0, A12 is 11, H12 is 95).",
         "title": "Location Index",
         "type": "integer"
      },
      "well_part": {
         "description": "String instance of :class:``WellPartType``. Allows targeting of the top or bottom of a well selected with the ``location_index``.",
         "title": "Well Part",
         "type": "string"
      }
   },
   "required": [
      "labware_id",
      "location_index",
      "well_part"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • labware_id (str)

  • location_index (int)

  • schema_version (Literal[1])

  • type (Literal['LocationAsLabwareIndex'])

  • well_part (str)

field type: Literal['LocationAsLabwareIndex'] = 'LocationAsLabwareIndex'
field schema_version: Literal[1] = 1
field labware_id: str [Required]

TCode ID of the labware to target, assigned previously by the :class:ADD_LABWARE command.

field location_index: int [Required]

Index into labware “slots”. In a 96-well plate, for example, this index operates in row-major order (A1 is 0, A12 is 11, H12 is 95).

field well_part: str [Required]

String instance of :class:WellPartType. Allows targeting of the top or bottom of a well selected with the location_index.

pydantic model tcode_api.schemas.location.LocationAsNodeId

Location specified by a node ID in the fleet’s TransformTree.

Show JSON schema
{
   "title": "LocationAsNodeId",
   "description": "Location specified by a node ID in the fleet's ``TransformTree``.",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationAsNodeId",
         "default": "LocationAsNodeId",
         "title": "Type",
         "type": "string"
      },
      "node_id": {
         "description": "ID of the node in the fleet's ``TransformTree`` to target. This command is primarily intended for debugging, as it requires separate access to the fleet's internal ``TransformTree`` server.",
         "title": "Node Id",
         "type": "string"
      }
   },
   "required": [
      "node_id"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • node_id (str)

  • schema_version (Literal[1])

  • type (Literal['LocationAsNodeId'])

field type: Literal['LocationAsNodeId'] = 'LocationAsNodeId'
field schema_version: Literal[1] = 1
field node_id: str [Required]

ID of the node in the fleet’s TransformTree to target. This command is primarily intended for debugging, as it requires separate access to the fleet’s internal TransformTree server.

pydantic model tcode_api.schemas.location.LocationRelativeToCurrentPosition

Location specified by a transformation matrix relative to position of the robot’s current control node.

Show JSON schema
{
   "title": "LocationRelativeToCurrentPosition",
   "description": "Location specified by a transformation matrix relative to position of the robot's current control node.",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationRelativeToCurrentPosition",
         "default": "LocationRelativeToCurrentPosition",
         "title": "Type",
         "type": "string"
      },
      "matrix": {
         "description": "4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the robot's current control node position.",
         "items": {
            "items": {
               "type": "number"
            },
            "type": "array"
         },
         "title": "Matrix",
         "type": "array"
      }
   },
   "required": [
      "matrix"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • matrix (list[list[float]])

  • schema_version (Literal[1])

  • type (Literal['LocationRelativeToCurrentPosition'])

field type: Literal['LocationRelativeToCurrentPosition'] = 'LocationRelativeToCurrentPosition'
field schema_version: Literal[1] = 1
field matrix: Annotated[list[list[float]]] [Required]

4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the robot’s current control node position.

pydantic model tcode_api.schemas.location.LocationRelativeToLabware

Location specified by relative to a labware’s..base node.

This location type is designed to define points on continuous-surface labware

(ex. agar plates.)

Show JSON schema
{
   "title": "LocationRelativeToLabware",
   "description": "Location specified by relative to a labware's..base node.\n\nThis location type is designed to define points on continuous-surface labware\n    (ex. agar plates.)",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationRelativeToLabware",
         "default": "LocationRelativeToLabware",
         "title": "Type",
         "type": "string"
      },
      "labware_id": {
         "description": "TCode ID of the labware to target, assigned previously by the :class:``ADD_LABWARE`` command.",
         "title": "Labware Id",
         "type": "string"
      },
      "matrix": {
         "description": "4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the labware's root node.",
         "items": {
            "items": {
               "type": "number"
            },
            "type": "array"
         },
         "title": "Matrix",
         "type": "array"
      }
   },
   "required": [
      "labware_id",
      "matrix"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • labware_id (str)

  • matrix (list[list[float]])

  • schema_version (Literal[1])

  • type (Literal['LocationRelativeToLabware'])

field type: Literal['LocationRelativeToLabware'] = 'LocationRelativeToLabware'
field schema_version: Literal[1] = 1
field labware_id: str [Required]

TCode ID of the labware to target, assigned previously by the :class:ADD_LABWARE command.

field matrix: Annotated[list[list[float]]] [Required]

4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the labware’s root node.

pydantic model tcode_api.schemas.location.LocationRelativeToRobot

Location relative to the robot’s root node.

Show JSON schema
{
   "title": "LocationRelativeToRobot",
   "description": "Location relative to the robot's root node.",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationRelativeToRobot",
         "default": "LocationRelativeToRobot",
         "title": "Type",
         "type": "string"
      },
      "robot_id": {
         "description": "TCode ID of the robot to target, assigned previously by the :class:``ADD_ROBOT`` command.",
         "title": "Robot Id",
         "type": "string"
      },
      "matrix": {
         "description": "4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the robot's root node.",
         "items": {
            "items": {
               "type": "number"
            },
            "type": "array"
         },
         "title": "Matrix",
         "type": "array"
      }
   },
   "required": [
      "robot_id",
      "matrix"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • matrix (list[list[float]])

  • robot_id (str)

  • schema_version (Literal[1])

  • type (Literal['LocationRelativeToRobot'])

field type: Literal['LocationRelativeToRobot'] = 'LocationRelativeToRobot'
field schema_version: Literal[1] = 1
field robot_id: str [Required]

TCode ID of the robot to target, assigned previously by the :class:ADD_ROBOT command.

field matrix: Annotated[list[list[float]]] [Required]

4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the robot’s root node.

pydantic model tcode_api.schemas.location.LocationRelativeToWorld

Location specified relative to the fleet’s root node.

Show JSON schema
{
   "title": "LocationRelativeToWorld",
   "description": "Location specified relative to the fleet's root node.",
   "type": "object",
   "properties": {
      "schema_version": {
         "const": 1,
         "default": 1,
         "title": "Schema Version",
         "type": "integer"
      },
      "type": {
         "const": "LocationRelativeToWorld",
         "default": "LocationRelativeToWorld",
         "title": "Type",
         "type": "string"
      },
      "matrix": {
         "description": "4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the fleet's root node.",
         "items": {
            "items": {
               "type": "number"
            },
            "type": "array"
         },
         "title": "Matrix",
         "type": "array"
      }
   },
   "required": [
      "matrix"
   ]
}

Config:
  • strict: bool = True

  • extra: str = ignore

Fields:
  • matrix (list[list[float]])

  • schema_version (Literal[1])

  • type (Literal['LocationRelativeToWorld'])

field type: Literal['LocationRelativeToWorld'] = 'LocationRelativeToWorld'
field schema_version: Literal[1] = 1
field matrix: Annotated[list[list[float]]] [Required]

4x4 transformation matrix represented as a list of 16 floats in row-major order. The transform is applied relative to the fleet’s root node.