Algorithmadvanced
Joint compatibility branch and bound
Also called JCBB.
Neira and Tardos's search for the largest set of reading to landmark pairings that passes one joint chi-square test. It rejects pairings that only look right one at a time.
- Solves
- Data association in SLAM
- Time
- O((n+1)^m (d m)^3) worstO((d m)^3) node
- Space
- O(n^2 d^2 + m) extra
- Where
- d = the dimension of one reading; m = the number of readings; n = the number of features
- Model
- Real RAM
- Properties
- deterministicexactonline
- Evidence
- Proof sketchCode in 1 languages
- Origin
- José Neira, Juan D. Tardós, 2001
Joint compatibility branch and bound (JCBB) finds which reading in a scan comes from which landmark of the map. It is a step of EKF SLAM and of other Gaussian filters, not a filter itself. The simple rule, nearest neighbor with a gate, tests each reading alone and can pair several readings wrongly in the same way. JCBB tests a whole set of pairings together: the readings share the error of the robot pose, so their innovations are correlated, and one chi-square test on the stacked innovation catches a set that is consistent one by one but not as a whole. A depth-first branch and bound search finds the set with the most pairings that passes. The worst case is exponential in the number of readings.
In plain words
The robot sees a few posts and must say which post on its map each one is. If its position estimate is off by half a meter, the closest post on the map is often the wrong one, and every reading is off in the same direction. Looking at one reading at a time cannot see this. JCBB looks at the readings together and asks if one shift of the robot explains all the pairings at once. It tries the pairings for the first reading, then for the second, and so on, and it stops on a branch as soon as the pairings so far cannot all be true. It keeps the answer that explains the most readings. Readings that fit no post, such as a passing person, stay unpaired.
The problem
The input is one step of a Gaussian filter. The state estimate has the covariance . There are readings and features of the map with predicted readings in , the Jacobians of the predictions with respect to the state, and the noise covariance of one reading. A hypothesis gives each reading a feature or for none. Its pairings have the stacked innovation and covariance
and the joint distance . The set is jointly compatible if , the quantile of the chi-square distribution with degrees of freedom; one pairing that passes alone is individually compatible. The off-diagonal blocks carry the shared error of the state. The output is a hypothesis with the most pairings that JCBB can reach (defined below), with the smallest among those.
The algorithm
JCBB(H, i) ▷ H: pairings of readings 0..i-1; Best: global, starts empty- 1
visit the node (H, i) - 2
if i = m then - 3
if |H| > |Best|, or |H| = |Best| and D²(H) < D²(Best) then - 4
Best ← H return- 5
for j ← 0 to n - 1 do - 6
if (i, j) is not individually compatible, or j is in H and pairings are unique then skip j - 7
if D²(H + (i, j)) ≤ χ²(d (|H| + 1), α) then - 8
JCBB(H + (i, j), i + 1) - 9
k_max ← |H| + (m - i - 1) ▷ the most pairings if reading i stays unpaired - 10
if k_max > |Best|, or k_max = |Best| and D²(H) < D²(Best) then - 11
JCBB(H + (i, *), i + 1) - 12
return Best ▷ after the call JCBB(∅, 0)
The search is depth first over the interpretation tree: level chooses the feature of reading , and the branch leaves it unpaired. Line L7 prunes a branch as soon as its pairings fail the joint test. Line L10 is the bound: if even pairing every later reading cannot beat the best hypothesis, the branch is not searched. The paper of Neira and Tardos keeps the first hypothesis with the most pairings and has only the first part of the tests of lines L3 and L10; the code calls this tie_break=False. The second part, the smaller among equal numbers of pairings, is an addition of this page, and it is safe because never decreases along a branch.
Line L7, the joint test. The code builds from blocks that it computes once, and solves one linear system per node. Neira and Tardos also give an incremental form of that reuses the result of the parent node.
Repeated features. By default two readings may pair with the same feature, as in the paper; a feature can produce two readings, for example two corners of one segment. With unique=True, line L6 forbids it.
Example
Three posts stand at , and . The robot thinks it is at the origin with , a standard deviation of 0.5 m on each axis, and it reads the position of each post relative to itself, with , with the noise . The robot is really at , so every reading is shifted by about m to the right. The readings are , and .
The individual distances for each reading and post are, with the gate :
| post 0 | post 1 | post 2 | |
|---|---|---|---|
| 1.994 | 0.302 | 12.187 | |
| 10.987 | 1.833 | 2.525 | |
| 39.633 | 18.787 | 1.940 |
Nearest neighbor takes the smallest value in each row and pairs with posts . Each pairing passes alone. Together they imply shifts of the robot of , and , which do not agree, and is far above . Already the first two pairings give .
JCBB starts with post 0 for (), adds post 1 for () and post 2 for (). This leaf has 3 pairings, the most possible, so no later branch passes line L10. The search then tries post 1 for ; with it, post 1 for gives and post 2 gives , both above 9.488, and the branch can reach only 2 pairings. The answer is posts , with implied shifts , and that agree. The search visits 5 nodes of the 85 in the full tree.
Correctness
The correctness proof shows that JCBB returns the best hypothesis of its search space: among the hypotheses whose pairings are individually compatible and whose prefixes, in the order of the readings, are all jointly compatible, it returns one with the most pairings and then the smallest . The proof uses that never decreases when a pairing is added, by a Schur complement, which makes both the pruning of line L7 and the bound of line L10 safe. The tests compare the result with a brute force search over all hypotheses on 24 random scenes with clutter.
The joint test itself is not monotone: the threshold grows with the number of pairings, so a set can pass while one of its prefixes fails. Such a set is outside the search space. The result is also only as good as the Gaussian model: with a wrong or strong nonlinearity, the right hypothesis can fail the test.
Proof: JCBB returns the best hypothesis of its search spacefull
Setting. There are readings and features with predicted readings , each in . The prediction has the Jacobian with respect to the state, whose estimate has the covariance . Each reading has the noise covariance , which is positive definite. A pairing is a pair . For a list of pairings with distinct readings, the stacked innovation is , and its covariance has the blocks . The joint distance is , with . is jointly compatible if , the quantile of the chi-square distribution with degrees of freedom. A pairing is individually compatible if the list that holds only this pairing is jointly compatible.
A hypothesis gives each reading a feature or (none). Its pairings are listed in the order of the readings. is reachable if every pairing of it is individually compatible, every prefix of is jointly compatible, and, if pairings must be unique, no feature appears twice. Order the hypotheses by the key : more pairings is better, and among equal numbers a smaller is better.
Claim. jcbb with tie_break=True returns a reachable hypothesis with the largest key, and its . With tie_break=False it returns a reachable hypothesis with the largest number of pairings.
The claim is about the search space of reachable hypotheses. It does not say that the result has the largest jointly compatible set of all hypotheses: see the remark at the end.
Lemma 1: is positive definite
, where stacks the and is block diagonal with on the diagonal, since the readings in are distinct. The first term is positive semidefinite and the second is positive definite. So is positive definite, and is well defined and nonnegative.
Lemma 2: the joint distance never decreases when a pairing is added
Let with not in . Split and , with and . By Lemma 1, and the Schur complement are positive definite, and block elimination gives
By induction, of a list is at least of each of its prefixes.
Lemma 3: the tree without the bound enumerates the reachable hypotheses
Consider the recursion without the test of line L10, so that line L11 always runs. A node is a pair (partial hypothesis for the readings , ). From a node, line L8 extends by exactly when the pairing is individually compatible (line L6), the feature is free if pairings must be unique (line L6), and the extended list of pairings is jointly compatible (line L7). Line L11 extends by , which adds no pairing. By induction on , the nodes at depth are exactly the partial hypotheses for the readings whose pairings are individually compatible, whose prefixes are all jointly compatible, and which respect uniqueness. At depth these are the reachable hypotheses, each once, since two children of a node differ at reading .
Lemma 4: the bound removes no strict improvement
Let the current best have the key when line L10 runs at a node with pairings and next reading . Every leaf below the child leaves reading unpaired and adds at most one pairing for each of the readings . So its number of pairings is at most , which line L9 computes.
- If , no leaf below has as many pairings as the best.
- If , a leaf below with pairings has a list of pairings that starts with , so by Lemma 2 its is at least . If , no such leaf has a smaller than the best. With
tie_break=Falsea leaf with an equal number of pairings is never accepted, so the case is the same as the first.
So when line L10 skips the child, no leaf below it would pass the test of line L3. The best key only grows during the search, so the same holds at every later time.
Proof of the claim
Line L3 accepts a leaf only if its key is larger than the current best key (with tie_break=False, only if it has more pairings). So the returned hypothesis is the leaf with the largest key among the leaves that the search reaches, or the empty hypothesis with key , which is reachable. By Lemma 3, the leaves of the unpruned tree are exactly the reachable hypotheses. By Lemma 4, every leaf that the bound removes would not have changed the best. So the search returns a reachable hypothesis with the largest key. The value of that it returns is the one computed at line L7 for the last pairing of that hypothesis, which is of its whole list of pairings.
Remark: the joint test is not monotone
Lemma 2 says that never decreases, but the threshold also grows with . So a list can be jointly compatible while one of its prefixes is not. JCBB prunes at the first prefix that fails, as in the paper of Neira and Tardos, so such a list is outside its search space. The claim above, and the test against brute force, are therefore about reachable hypotheses only.
Tests
test_joint_compatibility_branch_and_bound.py checks the claim on 24 random scenes with 3 to 5 readings, 2 to 4 features and about 20 percent clutter. It compares jcbb with a brute force search over all hypotheses that keeps the reachable ones, for both values of unique, and checks equal hypotheses and equal within . It also checks that tie_break=False finds the same number of pairings. Other tests check Lemma 2 on random lists, that every prefix of the result is jointly compatible, the chi-square quantiles against tables, the example of the page, and that a clutter reading stays unpaired.
Complexity
Let be the number of readings, the number of features and the dimension of one reading. Costs are in the real RAM model.
- Nodes: the tree has leaves, and in the worst case the search visits all of them. This is a property of the tree, and Neira and Tardos state that the algorithm is exponential. In practice, the gates of lines L6 and L7 remove most branches, and the bound removes most branches once a good hypothesis is found. The number of visited nodes depends on the clutter and on ; it is a measurement, not a bound.
- Per node: solving the system of line L7 costs for pairings, so . An incremental update of a Cholesky factor brings it to .
- Setup: the blocks cost for a state of size . For EKF SLAM with point landmarks, has a few nonzero columns, and the cost is much smaller.
- Memory: for the blocks and for the recursion.
Restricting the features to those that are near the robot keeps small, and that matters more than any other change.
Properties
- Exact search over its space. The result is the best reachable hypothesis, a theorem proved on this page. It is not a claim that the result is the true association.
- Robust to a shared error. It handles a large pose error that shifts all readings the same way, which is the case where nearest neighbor fails. This is the main reason to use it, for example at a loop closure.
- Rejects clutter. A reading that fits no feature stays unpaired, since the branch is always possible.
- Deterministic and order dependent. The order of the readings changes the search space through the prefix rule, and can change the answer when the joint test is close.
Variants and improvements
- Sequential compatibility nearest neighbor. Pair the readings one by one with their nearest neighbor and check the joint test as the set grows. Neira and Tardos compare JCBB with it.
- Randomized joint compatibility. Later work from the same group tests small random sets of pairings, as in RANSAC, and grows the best one with the joint test, which avoids the exponential search.
- Compatibility graphs. Make a graph whose nodes are individually compatible pairings and whose edges join pairings that are compatible two by two, and look for a maximum clique. This tests pairs, not the full set.
- Unique assignment. If each feature can produce at most one reading, set
unique=True. If a cost matrix is enough and the shared error is small, the Hungarian algorithm solves the assignment problem in polynomial time. - Multiple hypotheses. Particle methods such as FastSLAM can draw a different association in each particle, which keeps several answers alive.
When to use it
Use JCBB when several readings are taken at once and the pose error is large compared with the distance between features, for example when the robot comes back to a known area after a long loop. When the pose is well known and the features are far apart, nearest neighbor with a gate gives the same answer at a lower cost. With many readings and many nearby features, bound the search: split the readings into groups, or use a randomized variant.
Pitfalls
- The wrong quantile. The threshold of a set of pairings uses degrees of freedom, not . Using the threshold of one reading for the whole set rejects almost everything.
- Dropping the cross terms. If is built with only the diagonal blocks, the test reduces to a sum of individual tests and loses the shared error, which is the point of JCBB.
- Angles. For bearing readings, wrap each innovation before stacking.
- Too many readings. The worst case is exponential. A scan of 30 readings with many features in each gate can take a very long time; set a limit on the nodes or on the readings.
- An overconfident filter. If is too small, the right hypothesis fails the joint test, and JCBB returns fewer pairings. The EKF SLAM page describes how a nonlinear filter becomes overconfident.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/joint-compatibility-branch-and-bound/. The authors are listed in prov/V4AT33.jsonl.
"""Joint compatibility branch and bound (JCBB), after Neira and Tardos (2001).
The inputs describe one step of a Kalman filter with a state estimate of
covariance P (n_x by n_x):
z[i] the readings, each a vector of size d (i = 0 .. m-1)
h[j] the predicted reading of feature j (j = 0 .. n-1)
H[j] the Jacobian of that prediction with respect to the state (d by n_x)
R the covariance of the noise of one reading (d by d)
A hypothesis assigns to each reading a feature index or None (no feature).
For the set of its non-null pairings, the stacked innovation is
nu = (z[i] - h[j]) and its covariance is C = Hs P Hs^T + diag(R, ..., R),
where Hs stacks the H[j]. The hypothesis is jointly compatible if
D2 = nu^T C^(-1) nu is at most the chi-square quantile with d k degrees of
freedom at the given level, where k is the number of pairings.
JCBB searches the interpretation tree in the order of the readings and
returns the hypothesis with the most pairings among those that it can reach:
every pairing passes the individual test, and every prefix of the hypothesis
is jointly compatible. By default two readings may pair with the same feature,
as in the paper; unique=True forbids it.
"""
import math
import rbm
# ---------------------------------------------------------------- chi-square quantiles
def chi2_cdf(x, dof):
"""Return P(X <= x) for X chi-square with dof degrees of freedom.
This is the regularized lower incomplete gamma function P(dof/2, x/2),
by its power series, which converges for every x >= 0.
"""
if x <= 0.0:
return 0.0
a, y = dof / 2.0, x / 2.0
term = 1.0 / a
total = term
k = 1
while term > total * 1e-17:
term *= y / (a + k)
total += term
k += 1
return math.exp(-y + a * math.log(y) - math.lgamma(a)) * total
def chi2_quantile(level, dof):
"""Return x with chi2_cdf(x, dof) = level, by bisection to about 1e-12."""
lo, hi = 0.0, 1.0
while chi2_cdf(hi, dof) < level:
hi *= 2.0
for _ in range(200):
mid = (lo + hi) / 2.0
if chi2_cdf(mid, dof) < level:
lo = mid
else:
hi = mid
if hi - lo < 1e-12 * hi:
break
return (lo + hi) / 2.0
# ---------------------------------------------------------------- the joint test
class Problem:
"""Precomputed blocks H[j] P H[k]^T, so that each joint test is cheap."""
def __init__(self, z, h, hjac, p, r, level=0.95):
self.z = [list(map(float, zi)) for zi in z]
self.h = [list(map(float, hj)) for hj in h]
self.r = r
self.d = len(r)
self.level = level
hp = [rbm.mul(hj, p) for hj in hjac]
self.blk = [[rbm.mul(hp[j], rbm.transpose(hjac[k])) for k in range(len(h))] for j in range(len(h))]
self._quant = {}
def threshold(self, dof):
if dof not in self._quant:
self._quant[dof] = chi2_quantile(self.level, dof)
return self._quant[dof]
def d2(self, pairs):
"""Return the joint squared Mahalanobis distance of a list of (i, j) pairs."""
if not pairs:
return 0.0
d = self.d
nu = []
for i, j in pairs:
nu.extend(a - b for a, b in zip(self.z[i], self.h[j]))
k = len(pairs)
c = rbm.zeros(d * k, d * k)
for a, (ia, ja) in enumerate(pairs):
for b, (ib, jb) in enumerate(pairs):
blk = self.blk[ja][jb]
for u in range(d):
for v in range(d):
c[a * d + u][b * d + v] = blk[u][v] + (self.r[u][v] if ia == ib else 0.0)
y = rbm.solve(c, nu)
return sum(p * q for p, q in zip(nu, y))
def individually_compatible(self, i, j):
return self.d2([(i, j)]) <= self.threshold(self.d)
def jointly_compatible(self, pairs):
return self.d2(pairs) <= self.threshold(self.d * len(pairs))
def pairs_of(hyp):
"""Return the non-null pairings (i, j) of a hypothesis."""
return [(i, j) for i, j in enumerate(hyp) if j is not None]
# ---------------------------------------------------------------- JCBB
def jcbb(z, h, hjac, p, r, level=0.95, unique=False, tie_break=True):
"""Return (hypothesis, D2, nodes): the JCBB association and the number of nodes visited.
hypothesis[i] is the feature of reading i or None. With tie_break, a
hypothesis with as many pairings as the best one replaces it if its D2 is
smaller; without it, the first one found is kept, as in the paper.
"""
prob = Problem(z, h, hjac, p, r, level)
m, n = len(z), len(h)
ic = [[prob.individually_compatible(i, j) for j in range(n)] for i in range(m)]
best = {"hyp": [None] * m, "k": 0, "d2": 0.0}
nodes = [0]
def better(k, d2):
if k != best["k"]:
return k > best["k"]
return tie_break and d2 < best["d2"]
def search(hyp, pairs, d2, i): # @line L1
nodes[0] += 1
if i == m: # @line L2
if better(len(pairs), d2): # @line L3
best.update(hyp=list(hyp), k=len(pairs), d2=d2) # @line L4
return
for j in range(n): # @line L5
if not ic[i][j] or (unique and any(jj == j for _, jj in pairs)): # @line L6
continue
cand = pairs + [(i, j)]
cd2 = prob.d2(cand)
if cd2 <= prob.threshold(prob.d * len(cand)): # @line L7
search(hyp + [j], cand, cd2, i + 1) # @line L8
k_max = len(pairs) + m - i - 1 # @line L9
if k_max > best["k"] or (tie_break and k_max == best["k"] and d2 < best["d2"]): # @line L10
search(hyp + [None], pairs, d2, i + 1) # @line L11
search([], [], 0.0, 0)
return best["hyp"], best["d2"], nodes[0] # @line L12
# ---------------------------------------------------------------- baselines
def nearest_neighbor(z, h, hjac, p, r, level=0.95):
"""Return the individual compatibility nearest neighbor association.
Each reading takes the individually compatible feature with the smallest
D2, independently of the other readings.
"""
prob = Problem(z, h, hjac, p, r, level)
out = []
for i in range(len(z)):
best, best_d2 = None, math.inf
for j in range(len(h)):
d2 = prob.d2([(i, j)])
if d2 <= prob.threshold(prob.d) and d2 < best_d2:
best, best_d2 = j, d2
out.append(best)
return out
def reachable(prob, hyp, unique=False):
"""True if JCBB can reach hyp: each pairing is individually compatible and each prefix is jointly compatible."""
pairs = []
for i, j in enumerate(hyp):
if j is None:
continue
if not prob.individually_compatible(i, j):
return False
if unique and any(jj == j for _, jj in pairs):
return False
pairs.append((i, j))
if not prob.jointly_compatible(pairs):
return False
return True
def brute_force(z, h, hjac, p, r, level=0.95, unique=False):
"""Return (hypothesis, D2) by enumeration of all (n + 1)^m hypotheses.
Among the reachable hypotheses, take the most pairings, then the smallest D2.
"""
prob = Problem(z, h, hjac, p, r, level)
m, n = len(z), len(h)
best, best_key = [None] * m, (0, 0.0)
total = (n + 1) ** m
for code in range(total):
hyp, c = [], code
for _ in range(m):
c, rem = divmod(c, n + 1)
hyp.append(None if rem == n else rem)
if not reachable(prob, hyp, unique):
continue
k = sum(1 for j in hyp if j is not None)
d2 = prob.d2(pairs_of(hyp))
if k > best_key[0] or (k == best_key[0] and d2 < best_key[1]):
best, best_key = hyp, (k, d2)
return best, best_key[1]
rbm.py 482 lines
# SPDX-License-Identifier: MIT
# Shared helper of the robotics pages of https://algorithm.tamnd.com/. The authors are listed in prov/.
"""Small linear algebra, rotations, poses and quaternions for the robotics pages.
Conventions (Lynch and Park, Modern Robotics, 2017):
- A matrix is a list of rows. A vector is a flat list.
- hat3(w) is the skew-symmetric matrix [w], so that [w] x = w x x.
- A twist or screw is a 6-vector (omega, v), angular part first.
hat6(V) is the 4x4 matrix [[[omega], v], [0, 0]].
- A pose T is the 4x4 matrix [[R, p], [0, 1]].
- so3_exp and so3_log use exponential coordinates w = omega_hat * theta,
with theta = |w| in [0, pi] for so3_log.
- se3_exp and se3_log use 6-vectors (w, v) = S * theta.
- Quaternions are Hamilton, scalar first: q = (w, x, y, z), with i j = k.
- Angles are in radians.
The helper holds no algorithm of a robotics page except the four maps
so3_exp, so3_log, se3_exp and se3_log. The pages so3-logarithm-map and
se3-exponential-map hold their own complete versions with comments.
"""
import math
# Below this angle, the coefficient functions of the exponential and the
# logarithm are evaluated by their Taylor series. The first omitted term
# of each series is of order theta^6 and is below 3e-16 for theta < 1e-2;
# it also multiplies [w] or [w]^2, which are small. Above the threshold,
# the closed forms such as (1 - cos(theta)) / theta^2 lose at most about
# 1e-16 / theta^2 to cancellation, which [w] or [w]^2 brings to 1e-14.
SERIES_THETA = 1e-2
# Above pi - NEAR_PI, so3_log takes the axis from the symmetric part of R
# (which is (R + I) / 2 at theta = pi) and not from the skew part.
NEAR_PI = 1e-2
# A pivot whose magnitude is at most PIVOT_TOL times the largest entry of
# the matrix makes solve, inv and pinv_right raise ValueError.
PIVOT_TOL = 1e-12
# ---------------------------------------------------------------- matrices
def zeros(n, m):
"""Return the n by m zero matrix."""
return [[0.0] * m for _ in range(n)]
def eye(n):
"""Return the n by n identity matrix."""
return [[1.0 if i == j else 0.0 for j in range(n)] for i in range(n)]
def _is_matrix(a):
return len(a) > 0 and isinstance(a[0], list)
def add(a, b):
"""Return a + b for two vectors or two matrices of the same shape."""
if _is_matrix(a):
return [[x + y for x, y in zip(ra, rb)] for ra, rb in zip(a, b)]
return [x + y for x, y in zip(a, b)]
def sub(a, b):
"""Return a - b for two vectors or two matrices of the same shape."""
if _is_matrix(a):
return [[x - y for x, y in zip(ra, rb)] for ra, rb in zip(a, b)]
return [x - y for x, y in zip(a, b)]
def scale(a, s):
"""Return s * a for a vector or a matrix a and a number s."""
if _is_matrix(a):
return [[s * x for x in row] for row in a]
return [s * x for x in a]
def transpose(a):
"""Return the transpose of the matrix a."""
return [list(col) for col in zip(*a)]
def mul(a, b):
"""Return the matrix product a b."""
bt = transpose(b)
return [[sum(x * y for x, y in zip(row, col)) for col in bt] for row in a]
def matvec(a, x):
"""Return the product of the matrix a and the vector x."""
return [sum(p * q for p, q in zip(row, x)) for row in a]
def dot(x, y):
"""Return the dot product of two vectors."""
return sum(p * q for p, q in zip(x, y))
def norm(x):
"""Return the Euclidean norm of a vector."""
return math.sqrt(dot(x, x))
def cross(a, b):
"""Return the cross product a x b of two 3-vectors."""
return [
a[1] * b[2] - a[2] * b[1],
a[2] * b[0] - a[0] * b[2],
a[0] * b[1] - a[1] * b[0],
]
def _max_abs(a):
return max((abs(x) for row in a for x in row), default=0.0)
def solve(a, b):
"""Solve a x = b by Gaussian elimination with partial pivoting.
a is a square matrix. b is a vector or a matrix with one column per
right-hand side; the result has the same shape as b. Raise ValueError
if a pivot is at most PIVOT_TOL times the largest entry of a.
"""
n = len(a)
vec = not _is_matrix(b)
rhs = [[x] for x in b] if vec else [list(row) for row in b]
m = [list(map(float, row)) + list(map(float, r)) for row, r in zip(a, rhs)]
k = len(rhs[0]) if rhs else 0
tol = PIVOT_TOL * _max_abs(a)
for c in range(n):
piv = max(range(c, n), key=lambda r: abs(m[r][c]))
if abs(m[piv][c]) <= tol or m[piv][c] == 0.0:
raise ValueError("matrix is singular to working precision")
m[c], m[piv] = m[piv], m[c]
for r in range(c + 1, n):
f = m[r][c] / m[c][c]
if f != 0.0:
row_r, row_c = m[r], m[c]
for j in range(c, n + k):
row_r[j] -= f * row_c[j]
x = [[0.0] * k for _ in range(n)]
for r in range(n - 1, -1, -1):
for j in range(k):
s = m[r][n + j] - sum(m[r][i] * x[i][j] for i in range(r + 1, n))
x[r][j] = s / m[r][r]
return [row[0] for row in x] if vec else x
def inv(a):
"""Return the inverse of the square matrix a (see solve for errors)."""
return solve(a, eye(len(a)))
def det(a):
"""Return the determinant of the square matrix a by elimination."""
n = len(a)
m = [list(map(float, row)) for row in a]
d = 1.0
for c in range(n):
piv = max(range(c, n), key=lambda r: abs(m[r][c]))
if m[piv][c] == 0.0:
return 0.0
if piv != c:
m[c], m[piv] = m[piv], m[c]
d = -d
d *= m[c][c]
for r in range(c + 1, n):
f = m[r][c] / m[c][c]
for j in range(c, n):
m[r][j] -= f * m[c][j]
return d
def cholesky(a):
"""Return the lower triangular L with a = L L^T.
a must be symmetric positive definite. Raise ValueError if a diagonal
entry of the factor is not positive.
"""
n = len(a)
low = zeros(n, n)
for i in range(n):
for j in range(i + 1):
s = a[i][j] - sum(low[i][k] * low[j][k] for k in range(j))
if i == j:
if s <= 0.0:
raise ValueError("matrix is not positive definite")
low[i][i] = math.sqrt(s)
else:
low[i][j] = s / low[j][j]
return low
def pinv_right(j):
"""Return the right pseudoinverse J^T (J J^T)^(-1) of a J with full row rank."""
jt = transpose(j)
return mul(jt, inv(mul(j, jt)))
# ---------------------------------------------------------------- hat and vee
def hat3(w):
"""Return the 3x3 skew-symmetric matrix [w] of a 3-vector w."""
return [
[0.0, -w[2], w[1]],
[w[2], 0.0, -w[0]],
[-w[1], w[0], 0.0],
]
def vee3(m):
"""Return the 3-vector w of a skew-symmetric matrix m = [w]."""
return [m[2][1], m[0][2], m[1][0]]
def hat6(v):
"""Return the 4x4 matrix [V] = [[[omega], v], [0, 0]] of V = (omega, v)."""
w = hat3(v[:3])
return [
[w[0][0], w[0][1], w[0][2], v[3]],
[w[1][0], w[1][1], w[1][2], v[4]],
[w[2][0], w[2][1], w[2][2], v[5]],
[0.0, 0.0, 0.0, 0.0],
]
def vee6(m):
"""Return the 6-vector (omega, v) of a 4x4 matrix [V]."""
return [m[2][1], m[0][2], m[1][0], m[0][3], m[1][3], m[2][3]]
# ---------------------------------------------------------------- rotations
def rot_x(a):
"""Return the rotation by a radians about the x axis."""
c, s = math.cos(a), math.sin(a)
return [[1.0, 0.0, 0.0], [0.0, c, -s], [0.0, s, c]]
def rot_y(a):
"""Return the rotation by a radians about the y axis."""
c, s = math.cos(a), math.sin(a)
return [[c, 0.0, s], [0.0, 1.0, 0.0], [-s, 0.0, c]]
def rot_z(a):
"""Return the rotation by a radians about the z axis."""
c, s = math.cos(a), math.sin(a)
return [[c, -s, 0.0], [s, c, 0.0], [0.0, 0.0, 1.0]]
def rpy(roll, pitch, yaw):
"""Return R = Rz(yaw) Ry(pitch) Rx(roll)."""
return mul(rot_z(yaw), mul(rot_y(pitch), rot_x(roll)))
def so3_exp(w):
"""Return exp([w]) for exponential coordinates w = omega_hat * theta.
Rodrigues' formula in the form I + A [w] + B [w]^2 with
A = sin(theta) / theta and B = (1 - cos(theta)) / theta^2.
"""
t = norm(w)
if t < SERIES_THETA:
t2 = t * t
a = 1.0 - t2 / 6.0 + t2 * t2 / 120.0
b = 0.5 - t2 / 24.0 + t2 * t2 / 720.0
else:
a = math.sin(t) / t
b = (1.0 - math.cos(t)) / (t * t)
k = hat3(w)
k2 = mul(k, k)
return [[(1.0 if i == j else 0.0) + a * k[i][j] + b * k2[i][j] for j in range(3)] for i in range(3)]
def so3_log(r):
"""Return w = omega_hat * theta with exp([w]) = r and theta in [0, pi].
theta = atan2(|s|, c), where c = (trace(r) - 1) / 2 = cos(theta) and
s = vee(r - r^T) / 2 = sin(theta) omega_hat. For theta below
SERIES_THETA, w = s (1 + theta^2 / 6 + 7 theta^4 / 360). For theta
above pi - NEAR_PI, the axis comes from the symmetric part
((r + r^T) / 2 - c I) / (1 - c) = omega_hat omega_hat^T, and its sign
from s. At theta = pi both signs are valid; the sign is then chosen so
that the largest component of the axis is positive.
"""
c = (r[0][0] + r[1][1] + r[2][2] - 1.0) / 2.0
c = max(-1.0, min(1.0, c))
s = [(r[2][1] - r[1][2]) / 2.0, (r[0][2] - r[2][0]) / 2.0, (r[1][0] - r[0][1]) / 2.0]
sn = norm(s)
t = math.atan2(sn, c)
if t < SERIES_THETA:
t2 = t * t
f = 1.0 + t2 / 6.0 + 7.0 * t2 * t2 / 360.0
return [f * x for x in s]
if t <= math.pi - NEAR_PI:
return [t / sn * x for x in s]
b = [[(r[i][j] + r[j][i]) / 2.0 - (c if i == j else 0.0) for j in range(3)] for i in range(3)]
# b = (1 - c) omega_hat omega_hat^T. Its column k with the largest
# diagonal entry is (1 - c) omega_k omega_hat, with omega_k^2 >= 1/3.
k = max(range(3), key=lambda i: b[i][i])
col = [b[i][k] for i in range(3)]
axis = [x / norm(col) for x in col]
if dot(axis, s) < 0.0 or (dot(axis, s) == 0.0 and axis[k] < 0.0):
axis = [-x for x in axis]
return [t * x for x in axis]
# ---------------------------------------------------------------- poses
def make_T(r, p):
"""Return the 4x4 pose [[r, p], [0, 1]]."""
return [
[r[0][0], r[0][1], r[0][2], p[0]],
[r[1][0], r[1][1], r[1][2], p[1]],
[r[2][0], r[2][1], r[2][2], p[2]],
[0.0, 0.0, 0.0, 1.0],
]
def _rp(t):
return [row[:3] for row in t[:3]], [t[0][3], t[1][3], t[2][3]]
def T_inv(t):
"""Return the inverse [[R^T, -R^T p], [0, 1]] of a pose t."""
r, p = _rp(t)
rt = transpose(r)
return make_T(rt, [-x for x in matvec(rt, p)])
def T_apply(t, x):
"""Return R x + p, the image of the point x under the pose t."""
r, p = _rp(t)
return add(matvec(r, x), p)
def se3_exp(xi):
"""Return exp([xi]) for a 6-vector xi = (w, v) = S * theta.
The rotation is so3_exp(w). The translation is G v with
G = I + B [w] + C [w]^2, B = (1 - cos(theta)) / theta^2 and
C = (theta - sin(theta)) / theta^3, theta = |w|. For w = 0 this is a
translation by v.
"""
w, v = xi[:3], xi[3:]
t = norm(w)
if t < SERIES_THETA:
t2 = t * t
b = 0.5 - t2 / 24.0 + t2 * t2 / 720.0
c = 1.0 / 6.0 - t2 / 120.0 + t2 * t2 / 5040.0
else:
b = (1.0 - math.cos(t)) / (t * t)
c = (t - math.sin(t)) / (t * t * t)
k = hat3(w)
k2 = mul(k, k)
g = [[(1.0 if i == j else 0.0) + b * k[i][j] + c * k2[i][j] for j in range(3)] for i in range(3)]
return make_T(so3_exp(w), matvec(g, v))
def se3_log(t):
"""Return the 6-vector xi = (w, v) with se3_exp(xi) = t and |w| in [0, pi].
w = so3_log(R) and v = G^(-1) p with
G^(-1) = I - [w] / 2 + D [w]^2, D = (1 - (theta / 2) cot(theta / 2)) / theta^2.
"""
r, p = _rp(t)
w = so3_log(r)
th = norm(w)
if th < SERIES_THETA:
t2 = th * th
d = 1.0 / 12.0 + t2 / 720.0 + t2 * t2 / 30240.0
else:
half = th / 2.0
d = (1.0 - half * math.cos(half) / math.sin(half)) / (th * th)
k = hat3(w)
k2 = mul(k, k)
gi = [[(1.0 if i == j else 0.0) - 0.5 * k[i][j] + d * k2[i][j] for j in range(3)] for i in range(3)]
return w + matvec(gi, p)
def adjoint(t):
"""Return the 6x6 adjoint [[R, 0], [[p] R, R]] of a pose t."""
r, p = _rp(t)
pr = mul(hat3(p), r)
out = zeros(6, 6)
for i in range(3):
for j in range(3):
out[i][j] = r[i][j]
out[i + 3][j + 3] = r[i][j]
out[i + 3][j] = pr[i][j]
return out
# ---------------------------------------------------------------- quaternions
def quat_mul(q, r):
"""Return the Hamilton product q r of quaternions (w, x, y, z)."""
a1, b1, c1, d1 = q
a2, b2, c2, d2 = r
return [
a1 * a2 - b1 * b2 - c1 * c2 - d1 * d2,
a1 * b2 + b1 * a2 + c1 * d2 - d1 * c2,
a1 * c2 - b1 * d2 + c1 * a2 + d1 * b2,
a1 * d2 + b1 * c2 - c1 * b2 + d1 * a2,
]
def quat_conj(q):
"""Return the conjugate (w, -x, -y, -z)."""
return [q[0], -q[1], -q[2], -q[3]]
def quat_to_rot(q):
"""Return the rotation matrix of the quaternion q, so that (0, R v) = q (0, v) q*.
q need not be of unit length; the result is the rotation of q / |q|.
"""
w, x, y, z = q
n = w * w + x * x + y * y + z * z
s = 2.0 / n
return [
[1.0 - s * (y * y + z * z), s * (x * y - w * z), s * (x * z + w * y)],
[s * (x * y + w * z), 1.0 - s * (x * x + z * z), s * (y * z - w * x)],
[s * (x * z - w * y), s * (y * z + w * x), 1.0 - s * (x * x + y * y)],
]
def quat_from_axis_angle(axis, angle):
"""Return (cos(angle / 2), sin(angle / 2) axis / |axis|).
A zero axis is allowed only with angle 0 (the identity); otherwise
raise ValueError.
"""
n = norm(axis)
if n == 0.0:
if angle == 0.0:
return [1.0, 0.0, 0.0, 0.0]
raise ValueError("zero axis with a nonzero angle")
s = math.sin(angle / 2.0) / n
return [math.cos(angle / 2.0), s * axis[0], s * axis[1], s * axis[2]]
# ---------------------------------------------------------------- derivatives
def num_jacobian(f, x, h=1e-6):
"""Return the Jacobian of f at x by central differences with step h.
f maps a list of n numbers to a list of m numbers; the result is m by n.
"""
cols = []
for i in range(len(x)):
xp = list(x)
xm = list(x)
xp[i] += h
xm[i] -= h
fp, fm = f(xp), f(xm)
cols.append([(a - b) / (2.0 * h) for a, b in zip(fp, fm)])
return transpose(cols)
# ---------------------------------------------------------------- self-test
def self_test():
"""Check the area check values; return True or raise AssertionError."""
r = so3_exp([2.0 * math.pi / 3.0 / math.sqrt(3.0)] * 3)
want = [[0.0, 0.0, 1.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
assert max(abs(r[i][j] - want[i][j]) for i in range(3) for j in range(3)) < 1e-12
w = so3_log(want)
assert abs(norm(w) - 2.0943951) < 1e-7
assert max(abs(x - 2.0 * math.pi / 3.0 / math.sqrt(3.0)) for x in w) < 1e-12
t = se3_exp([0.0, 0.0, math.pi / 2.0, math.pi / 2.0, 0.0, 0.0])
want_t = make_T(rot_z(math.pi / 2.0), [1.0, 1.0, 0.0])
assert max(abs(t[i][j] - want_t[i][j]) for i in range(4) for j in range(4)) < 1e-12
return True
robest.py 149 lines
# SPDX-License-Identifier: MIT
# Shared helper of the robotics pages of https://algorithm.tamnd.com/. The authors are listed in prov/.
"""Small estimation helpers for the localization and SLAM pages.
Vectors are lists of floats and matrices are lists of rows, as in rbm.py.
The notation follows Thrun, Burgard and Fox, Probabilistic Robotics (2005).
wrap_angle(a) a wrapped to [-pi, pi)
gauss_sample(rng, mean, cov) one draw of N(mean, cov), by a Cholesky factor
gauss_pdf(x, mean, cov) the density of N(mean, cov) at x
mahalanobis2(x, mean, cov) (x - mean)^T cov^(-1) (x - mean)
low_variance_resample(rng, w) indices of a systematic (low variance) resample
logodds(p), prob_from_logodds(l) l = log(p / (1 - p)) and its inverse
CHI2[(dof, level)] chi-square quantiles for gates, dof 1 to 3
gauss_pdf and mahalanobis2 also take plain numbers: then cov is a variance.
This module holds no filter, no SLAM back end and no planner.
"""
import math
import rbm
CHI2 = {
(1, 0.95): 3.841,
(1, 0.99): 6.635,
(2, 0.95): 5.991,
(2, 0.99): 9.210,
(3, 0.95): 7.815,
(3, 0.99): 11.345,
}
_TWO_PI = 2.0 * math.pi
def wrap_angle(a):
"""Return a + 2 pi k in [-pi, pi), with ((a + pi) mod 2 pi) - pi.
An angle that is already in [-pi, pi) comes back unchanged, so that
small angles keep all their digits.
"""
if -math.pi <= a < math.pi:
return float(a)
w = math.fmod(a + math.pi, _TWO_PI)
if w < 0.0:
w += _TWO_PI
w -= math.pi
if w >= math.pi: # rounding can give exactly pi
w -= _TWO_PI
return w
def _as_vector(x):
if isinstance(x, (int, float)):
return [float(x)], True
return [float(v) for v in x], False
def _as_matrix(cov, scalar):
if scalar:
if isinstance(cov, (int, float)):
return [[float(cov)]]
return [[float(cov[0][0])]]
return [[float(v) for v in row] for row in cov]
def gauss_sample(rng, mean, cov):
"""Draw x = mean + L z, with cov = L L^T and z standard normal.
rng is a random.Random. cov must be symmetric positive definite.
A number for mean (with a variance for cov) gives a number.
"""
mu, scalar = _as_vector(mean)
if scalar:
var = float(cov) if isinstance(cov, (int, float)) else float(cov[0][0])
if var < 0.0:
raise ValueError("negative variance")
return mu[0] + math.sqrt(var) * rng.gauss(0.0, 1.0)
L = rbm.cholesky(_as_matrix(cov, False))
z = [rng.gauss(0.0, 1.0) for _ in mu]
return [mu[i] + sum(L[i][j] * z[j] for j in range(i + 1)) for i in range(len(mu))]
def mahalanobis2(x, mean, cov):
"""Return the squared Mahalanobis distance (x - mean)^T cov^(-1) (x - mean)."""
xv, scalar = _as_vector(x)
mv, _ = _as_vector(mean)
if len(xv) != len(mv):
raise ValueError("x and mean differ in size")
d = [a - b for a, b in zip(xv, mv)]
S = _as_matrix(cov, scalar)
if len(d) == 1:
return d[0] * d[0] / S[0][0]
y = rbm.solve(S, d)
return sum(a * b for a, b in zip(d, y))
def gauss_pdf(x, mean, cov):
"""Return the density of N(mean, cov) at x."""
xv, scalar = _as_vector(x)
S = _as_matrix(cov, scalar)
k = len(xv)
det = S[0][0] if k == 1 else rbm.det(S)
if det <= 0.0:
raise ValueError("covariance is not positive definite")
m2 = mahalanobis2(xv, mean if not scalar else [mean], S)
return math.exp(-0.5 * m2) / math.sqrt((_TWO_PI ** k) * det)
def low_variance_resample(rng, weights):
"""Return len(weights) indices drawn by the low variance sampler.
This is systematic resampling (Thrun et al. 2005, Table 4.4): one
uniform offset r in [0, 1/N), and the N points r + m / N select the
indices through the cumulative weights. The weights need not sum to 1.
"""
n = len(weights)
if n == 0:
return []
total = float(sum(weights))
if total <= 0.0 or any(w < 0.0 for w in weights):
raise ValueError("weights must be nonnegative with a positive sum")
r = rng.random() / n
c = weights[0] / total
i = 0
out = []
for m in range(n):
u = r + m / n
while u > c and i < n - 1:
i += 1
c += weights[i] / total
out.append(i)
return out
def logodds(p):
"""Return log(p / (1 - p)) for p in (0, 1)."""
if not 0.0 < p < 1.0:
raise ValueError("p must be in (0, 1)")
return math.log(p / (1.0 - p))
def prob_from_logodds(l):
"""Return p = 1 - 1 / (1 + exp(l)), the inverse of logodds, without overflow."""
if l >= 0.0:
return 1.0 / (1.0 + math.exp(-l))
e = math.exp(l)
return e / (1.0 + e)
test_joint_compatibility_branch_and_bound.py 124 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/joint-compatibility-branch-and-bound/. The authors are listed in prov/V4AT33.jsonl.
import random
import pytest
import rbm
import robest
from joint_compatibility_branch_and_bound import (
Problem,
brute_force,
chi2_quantile,
jcbb,
nearest_neighbor,
pairs_of,
)
MINUS_I = [[-1.0, 0.0], [0.0, -1.0]]
def scene(features, x_hat, readings, p, r):
"""A robot at estimate x_hat reads features of a known map: h_j = m_j - x_hat, H_j = -I."""
h = [rbm.sub(m, x_hat) for m in features]
return readings, h, [MINUS_I] * len(features), p, r
def random_scene(rng, m, n):
features = [[rng.uniform(0.0, 3.0), rng.uniform(0.0, 3.0)] for _ in range(n)]
a = [[rng.uniform(-0.4, 0.4) for _ in range(2)] for _ in range(2)]
p = rbm.add(rbm.mul(a, rbm.transpose(a)), [[0.02, 0.0], [0.0, 0.02]])
r = [[0.01, 0.0], [0.0, 0.01]]
x_true = robest.gauss_sample(rng, [0.0, 0.0], p)
readings = []
for _ in range(m):
if rng.random() < 0.2:
readings.append([rng.uniform(-1.0, 4.0), rng.uniform(-1.0, 4.0)]) # clutter
else:
f = features[rng.randrange(n)]
readings.append(robest.gauss_sample(rng, rbm.sub(f, x_true), r))
return scene(features, [0.0, 0.0], readings, p, r)
@pytest.mark.parametrize("dof,level", sorted(robest.CHI2))
def test_chi2_quantile_against_the_table(dof, level):
assert abs(chi2_quantile(level, dof) - robest.CHI2[(dof, level)]) < 1e-3
@pytest.mark.parametrize("dof,want", [(4, 9.488), (6, 12.592), (10, 18.307)])
def test_chi2_quantile_for_more_degrees_of_freedom(dof, want):
assert abs(chi2_quantile(0.95, dof) - want) < 1e-3
@pytest.mark.parametrize("unique", [False, True])
def test_jcbb_equals_brute_force_over_all_hypotheses(unique):
rng = random.Random(11 if unique else 12)
for trial in range(12):
m, n = 3 + trial % 3, 2 + trial % 3
args = random_scene(rng, m, n)
hyp, d2, _ = jcbb(*args, unique=unique)
want, want_d2 = brute_force(*args, unique=unique)
assert hyp == want
assert abs(d2 - want_d2) < 1e-9
paper, _, _ = jcbb(*args, unique=unique, tie_break=False)
assert len(pairs_of(paper)) == len(pairs_of(want))
def test_joint_distance_never_decreases_when_a_pairing_is_added():
rng = random.Random(13)
for _ in range(30):
args = random_scene(rng, 5, 4)
prob = Problem(*args)
pairs = [(i, rng.randrange(4)) for i in range(5)]
d = [prob.d2(pairs[:k]) for k in range(6)]
assert all(b >= a - 1e-12 for a, b in zip(d, d[1:]))
def test_every_prefix_of_the_result_is_jointly_compatible():
rng = random.Random(14)
for _ in range(20):
args = random_scene(rng, 5, 4)
prob = Problem(*args)
hyp, _, _ = jcbb(*args)
pairs = pairs_of(hyp)
for k in range(1, len(pairs) + 1):
assert prob.jointly_compatible(pairs[:k])
assert all(prob.individually_compatible(i, j) for i, j in pairs)
def example():
"""The example of the page: three features on a line and a robot that is 0.7 m off."""
features = [[0.0, 2.0], [1.0, 2.0], [2.5, 2.0]]
p = [[0.25, 0.0], [0.0, 0.25]]
r = [[0.01, 0.0], [0.0, 0.01]]
readings = [[0.72, 2.01], [1.69, 1.98], [3.21, 2.02]] # the true robot is at (-0.7, 0)
return scene(features, [0.0, 0.0], readings, p, r)
def test_example_nearest_neighbor_fails_and_jcbb_succeeds():
args = example()
assert nearest_neighbor(*args) == [1, 1, 2]
hyp, d2, _ = jcbb(*args)
assert hyp == [0, 1, 2]
assert d2 < chi2_quantile(0.95, 6)
prob = Problem(*args)
assert not prob.jointly_compatible([(0, 1), (1, 1), (2, 2)])
def test_clutter_reading_stays_unpaired():
features = [[0.0, 0.0], [2.0, 0.0], [0.0, 2.0]]
p = [[0.04, 0.0], [0.0, 0.04]]
r = [[0.01, 0.0], [0.0, 0.01]]
readings = [[0.1, 0.0], [2.1, 0.02], [5.0, 5.0], [0.08, 2.01]]
hyp, _, _ = jcbb(*scene(features, [0.0, 0.0], readings, p, r))
assert hyp == [0, 1, None, 2]
def test_pruning_visits_fewer_nodes_than_the_full_tree():
rng = random.Random(15)
for _ in range(5):
args = random_scene(rng, 5, 4)
_, _, nodes = jcbb(*args)
full = sum(5 ** k for k in range(6))
assert nodes < full
History
Data association with a gate on the Mahalanobis distance comes from target tracking. Neira and Tardos (2001) observed that in stochastic mapping, the readings of one scan are correlated through the robot pose, so individual gates accept wrong sets. They defined the joint compatibility test, gave an incremental way to compute it, and searched the interpretation tree, a tool of model based object recognition, by branch and bound. Their experiments compared JCBB with sequential compatibility nearest neighbor and showed that it is more robust when the pose error is large. JCBB is now a common data association step of EKF SLAM.
References
- José Neira and Juan D. Tardós, Data association in stochastic mapping using the joint compatibility test, IEEE Transactions on Robotics and Automation 17(6), 2001, pages 890 to 897, the individual and the joint compatibility tests, the incremental computation of the joint distance, the JCBB algorithm, and the comparison with sequential nearest neighbor
- Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics, MIT Press, 2005, Chapter 10, Section 10.3 (EKF SLAM with unknown correspondences) for the nearest neighbor rule with a gate
- Hugh Durrant-Whyte and Tim Bailey, Simultaneous localization and mapping, part I, IEEE Robotics and Automation Magazine 13(2), 2006, from page 99, the role of data association in SLAM
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag V4AT33 Edit this page History Report an error Markdown