Skip to content

Datasets_RepairPoses

POST
/v1/accounts/{account}/datasets/{dataset}:repairPoses
curl --request POST \
--url https://api.qualia.dev/v1/accounts/example/datasets/example:repairPoses \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "example", "adds": [ { "episode": "example", "hand": "SIDE_UNSPECIFIED", "kind": "KIND_UNSPECIFIED", "target": "TARGET_UNSPECIFIED", "startFrame": "example", "endFrame": "example", "takeIdentity": "example", "shift": [ 1 ], "turn": [ 1 ], "repairIdentity": "example" } ], "removes": [ { "episode": "example", "hand": "SIDE_UNSPECIFIED", "kind": "KIND_UNSPECIFIED", "target": "TARGET_UNSPECIFIED", "startFrame": "example", "endFrame": "example", "takeIdentity": "example", "shift": [ 1 ], "turn": [ 1 ], "repairIdentity": "example" } ], "fill": { "allowedErrorM": 1, "fallbackLimitS": 1 } }'

Adds and removes pose and jaw repairs of a handheld (UMI) upload’s takes: each one interpolates one hand’s position, rotation or jaw over take frames, undoes ingest’s fills there, or corrects a tracking slip with a STEP from one frame to the take’s end. The repairs are the upload’s [[repairs]] in meta/ingest.toml, a set keyed by take, hand, target and frames; the call composes the new set over the published one and starts one pose-only publication of the upload, as ResolvePoses does: it rewrites the pose files from the recorded values, so edits never stack, and older versions keep what they hold. Poll it as ResolvePoses’. The same set as published answers no_op; the same request while it runs answers that operation; a different one is FAILED_PRECONDITION until it lands (reason reingest_still_running).

On a merged dataset the takes stay in their member uploads: the call makes one pose-only publication per member whose takes it names, fenced on the dataset’s membership as a merged TCP move is, and answers each in RepairPosesResponse.members. The entry, set and converted-pair checks below cover every member before any is started; each member’s own admission (its pose files, a copy that left takes out, its head, another re-ingest) then answers in its status while the others start. While a member’s publication can still land it holds Remove, versions and the solver on the dataset, as a TCP move does.

FAILED_PRECONDITION unless the upload’s (each named member’s) published state is a converted handheld pair with a pose file for every take: a teleop, egocentric or unconverted upload, a mixture and an upload merged into a dataset (repair through the merged dataset) are refused. INVALID_ARGUMENT for a request of more than 200 adds or 200 removes, an entry on a cut piece or another dataset’s take, frames outside the take, an interpolation that ends at the take’s last frame, an add with no take_identity, an add on a take with an open handheld_pose_late finding unless the upload holds it already (“fix the pose timing first”), a remove of an entry the upload does not hold (a remove retried after it landed included), or a set the repair rules refuse (overlaps, more than 200 entries): one refusal names the first ten problems, by the request’s adds[i] and removes[i], and counts the rest. ABORTED when every problem is an add whose take_identity is not the take’s any more (“the take was re-processed since it was read”), or when the published head moved after this call read it: read again.

A STEP is refused INVALID_ARGUMENT on a jaw, without its shift or turn (three numbers on its target), with an end_frame other than start_frame + 1, before frame 2 or at the take’s last frame, with no repair_identity, one frame from another step on its hand and target (“merge them into one step”), or inside an interpolation’s run, its anchors or the frame after them; a rotation STEP removed while a later one on its hand stays (“undo the later step first”) or added before one (“remove the later step first”). A STEP add whose repair_identity is not the take’s any more is ABORTED (“the take’s repairs changed since it was read”), as a stale take_identity is.

With fill, the call changes the dataset’s fill settings instead ([pose_fill]): every take ingest filled is filled again from its recording, around every repair it holds, and a merged dataset’s change reaches every member. It takes no adds or removes.

account
required
string

The account id.

dataset
required
string

The dataset id.

Media type application/json

Request for Datasets.RepairPoses: one publication of the upload (of each member upload a merged dataset’s request names takes of).

object
name
required

Accounts/{account}/datasets/{dataset}: a handheld (UMI) upload, or a merged dataset of them.

string
adds

The repairs to add, each with the take_identity it was drawn on and, for a STEP, the repair_identity. An add the upload holds already, the same kind on the same key (for a STEP, with the same values), changes nothing.

Array<object>

One pose or jaw repair of one hand over take frames.

object
episode
required

The take: accounts/{account}/datasets/{dataset}/episodes/{episode}, an episode of the request’s dataset (on a merged dataset, its episode name, as SampleEpisodeSeries read it). A split piece’s frames are its own and are moved onto its take’s; a cut piece cannot be repaired.

string
hand
required

LEFT or RIGHT.

string format: enum
Allowed values: SIDE_UNSPECIFIED SIDE_LEFT SIDE_RIGHT
kind

What it does: required on adds, not read on removes.

string format: enum
Allowed values: KIND_UNSPECIFIED INTERPOLATE UNDO_FILL STEP
target
required

What it edits.

string format: enum
Allowed values: TARGET_UNSPECIFIED POSITION ROTATION JAW
startFrame
required

The frames [start_frame, end_frame) of the take as recorded, not of a trimmed window (add a trim’s start, window_start_seconds times fps, to a trimmed read’s frames). An interpolation starts at 1 or later and ends before the take’s last frame: its anchors are the frames either side. A step’s is the frame it starts at, 2 or later and before the take’s last frame.

string
endFrame
required

The end of the frames, exclusive. A step’s is start_frame + 1, on adds and removes alike: its key is its frame.

string
takeIdentity

Required on adds, not read on removes: the SampleEpisodeSeriesResponse.take_identity of the read the repair was drawn on. An add without one is INVALID_ARGUMENT.

string
shift

A POSITION step’s shift in metres, x, y and z: exactly three numbers on a position step’s add, empty otherwise. Not read on removes.

Array<number>
turn

A ROTATION step’s turn, a rotation vector (axis times angle) in radians composed on the left of the hand’s rotation: exactly three numbers on a rotation step’s add, empty otherwise. Not read on removes.

Array<number>
repairIdentity

Required on STEP adds, not read otherwise: the SampleEpisodeSeriesResponse.repair_identity of the read the step was measured on. A step is measured with the take’s earlier steps applied, so one whose take’s repairs changed since is ABORTED; a STEP add without it is INVALID_ARGUMENT. A STEP the upload already holds with the same values is not checked: its retry is a no-op.

string
removes

The repairs to remove, each named by its key (episode, hand, target and frames; kind and take_identity are not read). Applied before the adds, so a remove and an add of one key replace it. At least one add or remove, unless fill is set.

Array<object>

One pose or jaw repair of one hand over take frames.

object
episode
required

The take: accounts/{account}/datasets/{dataset}/episodes/{episode}, an episode of the request’s dataset (on a merged dataset, its episode name, as SampleEpisodeSeries read it). A split piece’s frames are its own and are moved onto its take’s; a cut piece cannot be repaired.

string
hand
required

LEFT or RIGHT.

string format: enum
Allowed values: SIDE_UNSPECIFIED SIDE_LEFT SIDE_RIGHT
kind

What it does: required on adds, not read on removes.

string format: enum
Allowed values: KIND_UNSPECIFIED INTERPOLATE UNDO_FILL STEP
target
required

What it edits.

string format: enum
Allowed values: TARGET_UNSPECIFIED POSITION ROTATION JAW
startFrame
required

The frames [start_frame, end_frame) of the take as recorded, not of a trimmed window (add a trim’s start, window_start_seconds times fps, to a trimmed read’s frames). An interpolation starts at 1 or later and ends before the take’s last frame: its anchors are the frames either side. A step’s is the frame it starts at, 2 or later and before the take’s last frame.

string
endFrame
required

The end of the frames, exclusive. A step’s is start_frame + 1, on adds and removes alike: its key is its frame.

string
takeIdentity

Required on adds, not read on removes: the SampleEpisodeSeriesResponse.take_identity of the read the repair was drawn on. An add without one is INVALID_ARGUMENT.

string
shift

A POSITION step’s shift in metres, x, y and z: exactly three numbers on a position step’s add, empty otherwise. Not read on removes.

Array<number>
turn

A ROTATION step’s turn, a rotation vector (axis times angle) in radians composed on the left of the hand’s rotation: exactly three numbers on a rotation step’s add, empty otherwise. Not read on removes.

Array<number>
repairIdentity

Required on STEP adds, not read otherwise: the SampleEpisodeSeriesResponse.repair_identity of the read the step was measured on. A step is measured with the take’s earlier steps applied, so one whose take’s repairs changed since is ABORTED; a STEP add without it is INVALID_ARGUMENT. A STEP the upload already holds with the same values is not checked: its retry is a no-op.

string
fill

The fill settings to hold from now on, in place of any held: with it the call takes no adds or removes. INVALID_ARGUMENT for a value out of range.

object
allowedErrorM

The error a fill may have at the 90th percentile, in metres, when ingest measures how long a gap a take’s own tracked stretches let it fill: above 0, at most 0.1. Default 0.01.

number format: double
fallbackLimitS

The longest gap filled, in seconds, in a take with too little tracked data to measure its own: above 0, at most 0.5. Default 0.2.

number format: double

OK

Media type application/json

Response for Datasets.RepairPoses.

object
operationId

The publication’s operation id, polled as ResolvePoses’ is. Empty when no_op is set.

string
noOp

True when the composed repairs are the published ones: nothing to wait for. On a merged dataset, when every member’s are.

boolean
members

On a merged dataset, one per member upload whose takes the request names, in membership order; operation_id is then empty. Empty for an upload.

Array<object>

One member upload’s part of Datasets.RepairPoses on a merged dataset.

object
upload

The member upload.

string
displayName

The member upload’s display name.

string
state

What its publication did.

string format: enum
Allowed values: STATE_UNSPECIFIED CURRENT RUNNING BUSY REFUSED
reason

Why it is BUSY or REFUSED.

string
operationId

Its publication’s operation id when RUNNING, polled at the upload’s reingests/{operation_id} as ResolvePoses’ is.

string
Example
{
"members": [
{
"state": "STATE_UNSPECIFIED"
}
]
}

Default error response

Media type application/json
One of:
API error

A refusal from the API itself.

object
code
required

The gRPC code name in upper case, e.g. NOT_FOUND.

string
message
required
string
retryable
required

Whether the same call may succeed if retried.

boolean
details
required

Empty, except when a dataset copy or move is refused: then one google.rpc.ErrorInfo with the refusal’s reason code, its domain and, in metadata, the datasets it names.

Array<object>
object
Example generated
{
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
]
}