FAILURE MAP
← Case archive

FA-12106 / Robotics frame conventions / Open access

A rigid transform translates a direction vector · case 01

A rigid transform translates a direction vector.

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

ROOT CAUSE

A direction is treated as a point with homogeneous weight one.

VERIFIED REPAIR

Translate points only, while rotating both kinds.

Unsuccessful approach: Suppressing translation for every value corrupts point coordinates.

Case contract

kind is point or direction; transform integer 2D v by quarter-turn q and translation t. Return a list.

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(v, q, t, kind):
    r=rot(v,q)
    return [r[i]+t[i] for i in range(2)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('translated direction', solve([N,0],1,[N,2*N],"direction"), [0,N])
check('translated point', solve([N,0],1,[N,2*N],"point"), [N,3*N])
check('point origin', solve([0,0],0,[N,-N],"point"), [N,-N])
check('zero direction', solve([0,0],0,[N,-N],"direction"), [0,0])
check('pure rotation', solve([N,2*N],2,[0,0],"point"), [-N,-2*N])
check('negative rotation', solve([N,2*N],-1,[N,N],"direction"), [2*N,-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
translated direction[1, 3][0, 1]Failed
translated point[1, 3][1, 3]Passed
point origin[1, -1][1, -1]Passed
zero direction[1, -1][0, 0]Failed
pure rotation[-1, -2][-1, -2]Passed
negative rotation[3, 0][2, -1]Failed

SHA-256 / 2f1ac83525fe7ed7745fe6b78461719b5f6e5a81bbb7c0056df7651e6678bfd8

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(v, q, t, kind):
    return list(rot(v,q))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('translated direction', solve([N,0],1,[N,2*N],"direction"), [0,N])
check('translated point', solve([N,0],1,[N,2*N],"point"), [N,3*N])
check('point origin', solve([0,0],0,[N,-N],"point"), [N,-N])
check('zero direction', solve([0,0],0,[N,-N],"direction"), [0,0])
check('pure rotation', solve([N,2*N],2,[0,0],"point"), [-N,-2*N])
check('negative rotation', solve([N,2*N],-1,[N,N],"direction"), [2*N,-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
translated direction[0, 1][0, 1]Passed
translated point[0, 1][1, 3]Failed
point origin[0, 0][1, -1]Failed
zero direction[0, 0][0, 0]Passed
pure rotation[-1, -2][-1, -2]Passed
negative rotation[2, -1][2, -1]Passed

SHA-256 / ca2342ce5689faeeffb3e14c42fcaeefd95bc31d250385546cd23cadfc7bd55b

3 / The verified repair

Exit 0
"""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(v, q, t, kind):
    r=rot(v,q)
    return [r[i]+(t[i] if kind=='point' else 0) for i in range(2)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('translated direction', solve([N,0],1,[N,2*N],"direction"), [0,N])
check('translated point', solve([N,0],1,[N,2*N],"point"), [N,3*N])
check('point origin', solve([0,0],0,[N,-N],"point"), [N,-N])
check('zero direction', solve([0,0],0,[N,-N],"direction"), [0,0])
check('pure rotation', solve([N,2*N],2,[0,0],"point"), [-N,-2*N])
check('negative rotation', solve([N,2*N],-1,[N,N],"direction"), [2*N,-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
translated direction[0, 1][0, 1]Passed
translated point[1, 3][1, 3]Passed
point origin[1, -1][1, -1]Passed
zero direction[0, 0][0, 0]Passed
pure rotation[-1, -2][-1, -2]Passed
negative rotation[2, -1][2, -1]Passed

SHA-256 / 40668298d33a0f0136a29068b15b43fa414e9ac1dc24668e7fcdb37ac3b06f12

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:53.870163+00:00.

Case digest / ba724ce2cee2d1a33765328ff1b5b0b86294ae7d80576fdabcd9c69b39a25cb0