Datasets_RepairPoses
const url = 'https://api.qualia.dev/v1/accounts/example/datasets/example:repairPoses';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"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}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account id.
The dataset id.
Request Body required
Section titled “Request Body required ”Request for Datasets.RepairPoses: one publication of the upload (of each member upload a merged dataset’s request names takes of).
object
Accounts/{account}/datasets/{dataset}: a handheld (UMI) upload, or a merged dataset of them.
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.
One pose or jaw repair of one hand over take frames.
object
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.
LEFT or RIGHT.
What it does: required on adds, not read on removes.
What it edits.
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.
The end of the frames, exclusive. A step’s is start_frame + 1, on adds and removes alike: its key is its frame.
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.
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.
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.
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.
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.
One pose or jaw repair of one hand over take frames.
object
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.
LEFT or RIGHT.
What it does: required on adds, not read on removes.
What it edits.
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.
The end of the frames, exclusive. A step’s is start_frame + 1, on adds and removes alike: its key is its frame.
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.
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.
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.
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.
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
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.
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.
Responses
Section titled “ Responses ”OK
Response for Datasets.RepairPoses.
object
The publication’s operation id, polled as ResolvePoses’ is. Empty when no_op is set.
True when the composed repairs are the published ones: nothing to wait for. On a merged dataset, when every member’s are.
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.
One member upload’s part of Datasets.RepairPoses on a merged dataset.
object
The member upload.
The member upload’s display name.
What its publication did.
Why it is BUSY or REFUSED.
Its publication’s operation id when RUNNING, polled at the upload’s reingests/{operation_id} as ResolvePoses’ is.
Example
{ "members": [ { "state": "STATE_UNSPECIFIED" } ]}default
Section titled “default ”Default error response
A refusal from the API itself.
object
The gRPC code name in upper case, e.g. NOT_FOUND.
Whether the same call may succeed if retried.
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.
object
A refusal from the gateway before the call reaches the API, for example 401 bad or missing API key, 403 key lacks the scope or environment closed, 413 body too large.
object
What went wrong.
Example generated
{ "code": "example", "message": "example", "retryable": true, "details": [ {} ]}