FAILURE MAP
← Case archive

FA-12126 / Robotics frame conventions / Open access

A scalar-last quaternion is read by a scalar-first adapter · case 01

A scalar-last quaternion is read by a scalar-first adapter.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A wire xyzw tuple is forwarded as if it were wxyz.

THE FAILURE

A wire xyzw tuple is forwarded as if it were wxyz.

Unsuccessful approach: Reversing all components also reverses the vector-axis order.

Case contract

Convert a four-element xyzw quaternion representation to wxyz without changing signs, magnitude, or axis order. This adapter does not normalize or choose equivalent quaternion signs.

Why this case matters

Robot adapters must preserve the declared frame, reference point, and representation conventions across interfaces.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

def rot(v, q):
    x,y = v
    return [(x,y),(-y,x),(-x,-y),(y,-x)][q%4]

N = 1
observations = []
def solve(q):
    return q
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('identity', solve([0,0,0,1]), [1,0,0,0])
check('x half turn', solve([1,0,0,0]), [0,1,0,0])
check('y half turn', solve([0,1,0,0]), [0,0,1,0])
check('z half turn', solve([0,0,1,0]), [0,0,0,1])
check('scaled wire value', solve([N,2*N,3*N,4*N]), [4*N,N,2*N,3*N])
check('negative representation', solve([-N,0,N,-N]), [-N,-N,0,N])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
identity[0, 0, 0, 1][1, 0, 0, 0]Failed
x half turn[1, 0, 0, 0][0, 1, 0, 0]Failed
y half turn[0, 1, 0, 0][0, 0, 1, 0]Failed
z half turn[0, 0, 1, 0][0, 0, 0, 1]Failed
scaled wire value[1, 2, 3, 4][4, 1, 2, 3]Failed
negative representation[-1, 0, 1, -1][-1, -1, 0, 1]Failed

SHA-256 / 69971773b267f01810a43da8ed98b885b8f00a0e7b9f58d42c97da0527b63150

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

def rot(v, q):
    x,y = v
    return [(x,y),(-y,x),(-x,-y),(y,-x)][q%4]

N = 1
observations = []
def solve(q):
    return list(reversed(q))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('identity', solve([0,0,0,1]), [1,0,0,0])
check('x half turn', solve([1,0,0,0]), [0,1,0,0])
check('y half turn', solve([0,1,0,0]), [0,0,1,0])
check('z half turn', solve([0,0,1,0]), [0,0,0,1])
check('scaled wire value', solve([N,2*N,3*N,4*N]), [4*N,N,2*N,3*N])
check('negative representation', solve([-N,0,N,-N]), [-N,-N,0,N])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
identity[1, 0, 0, 0][1, 0, 0, 0]Passed
x half turn[0, 0, 0, 1][0, 1, 0, 0]Failed
y half turn[0, 0, 1, 0][0, 0, 1, 0]Passed
z half turn[0, 1, 0, 0][0, 0, 0, 1]Failed
scaled wire value[4, 3, 2, 1][4, 1, 2, 3]Failed
negative representation[-1, 1, 0, -1][-1, -1, 0, 1]Failed

SHA-256 / 15b6a114b44d278f69a0e0dda7ff2d20288f936de92bd2efb57d97c6325e7be0

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Small exact offline frame model; not a robot middleware implementation or continuous pose estimator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:54.116464+00:00.

Case digest / d019dfeba06c61921f7d36057a15cbd907cc24f7107506c6b861c8de1bcae9b8