← Projects

Appendix: Convergence of the Next-Best-View Stopping Criterion

Test entry for checking how long-form markdown, math and tables render.

  • robotics
  • nbv
  • test

This appendix analyzes the criterion by which the next-best-view (NBV) inspection loop decides that a target has been sufficiently reconstructed and halts. The treatment is grounded in the implementation (the nbv_cpp scorer and the sample_nbv_behaviors behaviors SetViews, GetBestView, GetBestViewWithCost, and CheckScoreSaturation); each claim is scoped to what that implementation guarantees rather than to an idealized model. Code references are given as file:line.


Notation

symbolmeaning
kkNBV cycle index (0-based)
sk\mathbf{s}_kvector of candidate fractional scores at cycle kk, (sk,1,…,sk,Nk)(s_{k,1},\dots,s_{k,N_k})
sk,js_{k,j}fractional score IGj/V\mathrm{IG}_j/V of candidate jj at cycle kk
NkN_knumber of surviving candidates at cycle kk
Sk, mkS_k,\ m_ksum-norm ∥sk∥1\|\mathbf{s}_k\|_1 and max-norm ∥sk∥∞=max⁡jsk,j\|\mathbf{s}_k\|_\infty=\max_j s_{k,j}
Δk\Delta_ksum decrement Sk−Sk+1S_k-S_{k+1} (§6)
jk⋆j^\star_kindex of the view the policy executes at cycle kk
sk,jk⋆s_{k,j^\star_k}score of the executed view; =mk=m_k (greedy), ≤mk\le m_k (CI-NBV)
PkP_krunning peak max⁡i≤kmi\max_{i\le k}m_i (capital P; the normalizer)
ρk\rho_kconvergence ratio mk/Pk∈[0,1]m_k/P_k\in[0,1]
γk\gamma_kper-step factor mk/mk−1m_k/m_{k-1}
ε\varepsilonconvergence tolerance (fraction of peak): applied to ρk\rho_k, and to the peak-normalized §6 rules
pppatience: consecutive sub-threshold cycles to declare convergence (crossing included)
cccrossing cycle: first kk with ρk<ε\rho_k<\varepsilon (a cycle index, not a cost)
α\alphaCI-NBV cost weight in [0,1][0,1] (α=0\alpha=0 recovers pure greedy)
ck,jc_{k,j}Dubins path cost of view jj at cycle kk (always subscripted; distinct from crossing cc)
FkF_kfeasible set {j:ck,j<∞}\{j:c_{k,j}<\infty\}
uk,ju_{k,j}CI-NBV utility (1−α) IG~j−α c~j(1-\alpha)\,\widetilde{\mathrm{IG}}_j-\alpha\,\tilde c_j

1. The Information-Gain Score

For each candidate view jj, the server ray-casts the view frustum into the TSDF and counts voxels (next_best_view.cpp:374):

IGj=∣{unique ROI voxels reached by view j’s rays that are unknown or rear-side}∣.\mathrm{IG}_j = \bigl|\{\text{unique ROI voxels reached by view } j\text{'s rays that are unknown or rear-side}\}\bigr|.

Each ray is walked (Amanatides-Woo) until the first surface crossing (next_best_view.cpp:456); a voxel is counted if and only if it lies inside the ROI and (next_best_view.cpp:470) is either

  • unknown (weight_ == 0, never integrated), or
  • rear-side (tsdf_ < 0, behind a surface or interior).

Voxels are de-duplicated across rays, so IGj\mathrm{IG}_j measures distinct still-uninformed volume the view can see rather than a ray count. It is a visibility-coverage proxy: how much unseen or interior volume the view can reach before being occluded.

The blackboard score is the fraction, normalized by the constant total grid size V=getNumVoxels()V=\texttt{getNumVoxels()} (nbv_server.cpp:451):

sk,j=IGjV∈[0,1].s_{k,j} = \frac{\mathrm{IG}_j}{V}\in[0,1].

Since VV is fixed for a given target, this normalization is a pure rescaling and affects no monotonicity argument. After each executed view, SetViews re-scores all surviving candidates against the updated TSDF.


2. Monotonicity: An Idealization, Not a Guarantee

The clean contraction picture requires IG\mathrm{IG} to be a monotone submodular set function. This holds only in an idealized model, namely coverage of a fixed unknown volume under known visibility, in which a survivor's score never rises between cycles:

sk+1,j≤sk,j(idealized submodular regime).s_{k+1,j}\le s_{k,j}\qquad(\text{idealized submodular regime}).

The implemented scorer satisfies this only approximately. Decomposing the count:

  • The unknown term (weight_ == 0) is monotone: an observed voxel never reverts to unknown, and the per-view de-duplication (§1) prevents one voxel from inflating the count across rays (the multi-counting that classically breaks submodularity).
  • The surface-termination term is not provably monotone. The truncating zero-crossing is a running weighted average, so in principle an early phantom surface can erode under later measurements, allowing a survivor's rays to penetrate farther and re-count, i.e. sk+1,j>sk,js_{k+1,j} > s_{k,j}. This requires a transient mis-estimate to reverse, so it is unlikely to materially move mkm_k in practice, but it cannot be excluded.

Consequently IG\mathrm{IG} (hence sk,js_{k,j} and the per-cycle maximum mkm_k) is dominantly, and almost always in practice, monotone, but not provably so. The clean contraction is an idealization on which the system does not rely.

The implemented criterion reflects this. The convergence node uses a running maximum (peak_ = std::max(peak_, curr_max), check_score_saturation.cpp:50) and a patience debounce (check_score_saturation.cpp:60-66). Were mkm_k guaranteed monotone, peak_ would always equal m0m_0 (making the running maximum redundant) and a single dip below ε\varepsilon would be permanent (making patience unnecessary). Both mechanisms exist precisely because mkm_k can be exceeded by a later value.


3. The Score Vector and Its Norms

At cycle kk the NkN_k surviving candidates form the vector sk=(sk,1,…,sk,Nk)\mathbf{s}_k=(s_{k,1},\dots,s_{k,N_k}). Two candidate stopping functionals arise:

  • Sum (ℓ1\ell_1): ∥sk∥1=∑jsk,j\|\mathbf{s}_k\|_1=\sum_j s_{k,j}
  • Max (ℓ∞\ell_\infty): ∥sk∥∞=max⁡jsk,j=:mk\|\mathbf{s}_k\|_\infty=\max_j s_{k,j}=:m_k

By norm equivalence, ∥sk∥∞≤∥sk∥1≤Nk ∥sk∥∞\|\mathbf{s}_k\|_\infty \le \|\mathbf{s}_k\|_1 \le N_k\,\|\mathbf{s}_k\|_\infty, where the relating constant is the candidate count NkN_k. Oversampling the viewpoint manifold (for example a dense helix or cone) inflates NkN_k, so the sum grows with discretization density while the maximum is invariant to it. The ℓ∞\ell_\infty functional is therefore the scale- and density-invariant progress measure; the ℓ1\ell_1 functional is not.


4. Greedy Selection Realizes the Infinity Norm

In pure NBV, GetBestView (get_best_view.cpp:39) selects and executes the IG-maximizing candidate:

jk⋆=arg⁡max⁡jsk,j,mk=sk,jk⋆=∥sk∥∞.j^\star_k=\arg\max_j s_{k,j},\qquad m_k = s_{k,j^\star_k}=\|\mathbf{s}_k\|_\infty.

Evaluating the greedy step is thus identical to evaluating the ℓ∞\ell_\infty norm: the objective and the stopping functional are the same quantity, so monitoring mkm_k tracks exactly the value the policy captures each cycle. This self-consistency is a property of pure greedy selection, and is precisely what the cost-informed variant breaks (§7).


5. The Convergence Metric

The loop monitors the peak remaining gain mkm_k, normalized by the running peak Pk=max⁡i≤kmiP_k=\max_{i\le k}m_i (rather than by the initial value m0m_0):

ρk=mkPk∈[0,1],halt when ρk<ε on p consecutive cycles (patience, §5.1).\rho_k=\frac{m_k}{P_k}\in[0,1],\qquad \text{halt when } \rho_k<\varepsilon \text{ on } p \text{ consecutive cycles (patience, §5.1).}

Here ε\varepsilon is a relative tolerance, interpreted as a fraction of peak informativeness, and pp is the patience parameter.

Why the peak gain decays. Each cycle applies two operations to the score vector, on different footing:

  • Prune (unconditional). The executed view jk⋆j^\star_k is removed, and removing an element cannot raise a maximum (the maximum over a subset is at most the maximum over the superset), for any removed index. This step is always monotone.
  • Re-score (reliable but not provable). The survivors are re-scored against the enlarged observed set. Under submodularity (diminishing returns) no view's marginal gain rises, so sk+1,j≤sk,js_{k+1,j}\le s_{k,j}. The TSDF recompute can in principle violate this (§2, surface revision), but only through a transient mis-estimate, so in practice it almost never raises a survivor.

Combining the two,

mk+1=max⁡j≠jk⋆sk+1,j  ≤  max⁡j≠jk⋆sk,j  ≤  mk,m_{k+1}=\max_{j\ne j^\star_k}s_{k+1,j}\;\le\;\max_{j\ne j^\star_k}s_{k,j}\;\le\; m_k,

so ρk\rho_k decays. The prune half is guaranteed; the re-score half holds in all but pathological TSDF transients. The running peak PkP_k and the patience window (§5.1) absorb those rare excursions, and pool exhaustion (§5.2) supplies the one guarantee that needs no assumption at all.

Analytical character. The metric is a debounced approximate non-expansion rather than a Banach contraction. The per-step factor γk=mk/mk−1\gamma_k=m_k/m_{k-1} is geometry-dependent, not a uniform modulus below 1. The telescoping identity ρk=∏iγi\rho_k=\prod_i\gamma_i holds only while mkm_k is non-increasing; a rare re-score excursion can drive γk>1\gamma_k>1, which PkP_k absorbs (ρk\rho_k resets to 1 at a new peak), so ρk∈[0,1]\rho_k\in[0,1] throughout but is not itself monotone.

5.1 Patience

Saturation requires ρk<ε\rho_k<\varepsilon on pp consecutive cycles, the crossing cycle included (check_score_saturation.cpp:60-66; the patience port, default 2; lowercase pp, distinct from the running peak PkP_k). Let cc be the first cycle with ρc<ε\rho_c<\varepsilon. Because below_count_ is incremented on cycle cc itself, the crossing is confirmation 1, and the stop occurs at

k⋆=c+(p−1).k^\star = c + (p-1).

The p−1p-1 cycles beyond the crossing are the debounce overhead; setting p=1p=1 recovers the eager rule that stops at cc. This count assumes ρk\rho_k remains below ε\varepsilon throughout the window. Under the non-strictly-monotone signal of §2, an upward excursion resets below_count_ to 0 (check_score_saturation.cpp:62-63) and the count restarts, so p−1p-1 is the minimum overhead and the patience window performs genuine noise rejection.

5.2 The Assumption-Free Guarantee: Pool Exhaustion

Each cycle removes exactly one candidate (Nk+1=Nk−1N_{k+1}=N_k-1), so the loop halts within N0N_0 cycles irrespective of monotonicity, and no sequence of patience resets (§5.1) can prevent termination. Saturation is therefore an early-stop layered on this hard bound, never a prerequisite for halting. The practical payoff of the normalization is portability: ε\varepsilon expresses a fraction of peak informativeness that carries the same meaning across targets and pool sizes.


6. The Infinity-Norm Rule Stops No Later Than the Sum Rule

This section assumes pure greedy selection and the submodular regime of §2.

Marginal progress of each rule. Let Δk:=Sk−Sk+1\Delta_k := S_k - S_{k+1} be the decrement of the sum produced by cycle kk's observation, with Sk=∥sk∥1S_k=\|\mathbf{s}_k\|_1. It splits into the removed view plus the re-scoring of the survivors:

Δk  =  sk,jk⋆⏟removed view  +  ∑j≠jk⋆(sk,j−sk+1,j)⏟driftk ≥ 0.\Delta_k \;=\; \underbrace{s_{k,j^\star_k}}_{\text{removed view}} \;+\; \underbrace{\sum_{j\ne j^\star_k}\bigl(s_{k,j}-s_{k+1,j}\bigr)}_{\text{drift}_k \,\ge\, 0}.

For pure greedy, jk⋆=arg⁡max⁡jsk,jj^\star_k=\arg\max_j s_{k,j}, so the removed view is the maximum, sk,jk⋆=mks_{k,j^\star_k}=m_k, giving Δk=mk+driftk≥mk\Delta_k = m_k + \text{drift}_k \ge m_k.

Two stopping rules at a common tolerance. Normalizing both marginal-progress measures by the running peak PkP_k (the §5 normalizer) lets ε\varepsilon serve as a single relative tolerance. Each rule fires at the first cycle its peak-normalized measure drops below ε\varepsilon:

k∞⋆=min⁡{k:ρk<ε},k1⋆=min⁡{k:Δk/Pk<ε},ρk=mkPk.k^\star_\infty = \min\{k : \rho_k < \varepsilon\}, \qquad k^\star_1 = \min\{k : \Delta_k/P_k < \varepsilon\}, \qquad \rho_k=\tfrac{m_k}{P_k}.

The ℓ∞\ell_\infty rule is exactly the convergence test of §5.

Ordering by set inclusion. Since driftk≥0\text{drift}_k\ge0, dividing Δk=mk+driftk\Delta_k=m_k+\text{drift}_k by PkP_k gives Δk/Pk≥ρk\Delta_k/P_k\ge\rho_k, hence Δk/Pk<ε⇒ρk<ε\Delta_k/P_k<\varepsilon \Rightarrow \rho_k<\varepsilon. The ℓ1\ell_1 stop-set is therefore contained in the ℓ∞\ell_\infty stop-set, and the minimum over a subset is no smaller than the minimum over its superset:

{k:Δk/Pk<ε}⊆{k:ρk<ε}⟹ k∞⋆≤k1⋆ \{k:\Delta_k/P_k<\varepsilon\}\subseteq\{k:\rho_k<\varepsilon\} \quad\Longrightarrow\quad \boxed{\,k^\star_\infty \le k^\star_1\,}

The difference is a wasted tail: cycles spent waiting for driftk∼O(Nkδ)\text{drift}_k\sim O(N_k\delta) to bleed off after the best remaining view has already collapsed. The sum rule is worst in over-sampled scenes, where this drift is largest, while the max rule incurs no such penalty.

The result carries the usual caveats: the bound is weak (≤\le); strictness requires drift>0\text{drift}>0; both rules require submodularity, which a rare re-score excursion can locally violate (§2); and the identity sk,jk⋆=mks_{k,j^\star_k}=m_k holds only for pure greedy, since under CI-NBV the removed view is sub-maximal (§7).


7. The Cost-Informed Case (CI-NBV)

GetBestViewWithCost (get_best_view_with_cost.cpp:64-99) replaces the IG-maximizing selection with a utility maximization over the feasible set Fk={j:ck,j<∞}F_k=\{j:c_{k,j}<\infty\} (the views with finite Dubins cost from the live pose), with each objective min-max normalized over FkF_k:

uk,j=(1−α) IG~j−α c~j,jk⋆=arg⁡max⁡j∈Fkuk,j,u_{k,j}=(1-\alpha)\,\widetilde{\mathrm{IG}}_j-\alpha\,\tilde c_j,\qquad j^\star_k=\arg\max_{j\in F_k}u_{k,j},

falling back to arg⁡max⁡jsk,j\arg\max_j s_{k,j} when Fk=∅F_k=\varnothing.

7.1 The ℓ∞\ell_\infty self-consistency is lost. For α>0\alpha>0, jk⋆j^\star_k is the utility maximizer, in general not the IG maximizer, so the identity of §4 degrades to

mk=∥sk∥∞  ≥  sk,jk⋆.m_k=\|\mathbf{s}_k\|_\infty \;\ge\; s_{k,j^\star_k}.

The executed view's gain is no longer the monitored quantity: the objective (utility) and the stopping functional (maximum IG) are now distinct functionals on the same vector.

7.2 The metric is policy-agnostic; the full-set maximum stays monotone. Selection is upstream: jk⋆=arg⁡max⁡j∈Fkuk,jj^\star_k=\arg\max_{j\in F_k}u_{k,j} is fixed first, after which the survivor set Fk∖{jk⋆}F_k\setminus\{j^\star_k\} is re-scored. Monotonicity then follows in two stages:

mk+1=max⁡j≠jk⋆sk+1,j  ≤⏟re-score  max⁡j≠jk⋆sk,j  ≤⏟prune  max⁡jsk,j=mk.m_{k+1}=\max_{j\ne j^\star_k}s_{k+1,j}\;\underbrace{\le}_{\text{re-score}}\;\max_{j\ne j^\star_k}s_{k,j}\;\underbrace{\le}_{\text{prune}}\;\max_j s_{k,j}=m_k.

The prune inequality is where care is needed; the survivor maximum relates to mkm_k by two cases:

  • Case A (utility pick ≠\ne IG-max, the general case): the highest-IG view remains in the survivor set, so max⁡j≠jk⋆sk,j=mk\max_{j\ne j^\star_k}s_{k,j}=m_k (equality).
  • Case B (utility pick == IG-max, the coincidence): the peak entry is the one removed, so max⁡j≠jk⋆sk,j<mk\max_{j\ne j^\star_k}s_{k,j}<m_k (strict).

Writing =mk=m_k would silently assume Case A, i.e. that the cost-aware policy never selects the IG-max, which CI-NBV does not guarantee; the inequality covers both. The re-score inequality is the submodular drift of §5 (survivors fall, barring the rare transient of §2).

Monotonicity therefore arises from a shrinking set together with submodular re-scoring, not from the policy removing the maximum, and holds identically for NBV and CI-NBV. The convergence metric of §5 transfers to CI-NBV unchanged.

7.3 What changes is the rate, not the validity. Pure greedy removes the top component each step (an active contraction). CI-NBV removes a sub-maximal view, so mkm_k decays only through passive submodular drift until the expensive view eventually becomes utility-best, or until FkF_k empties and the fallback fires. Convergence reaches the same place and remains monotone, but generically takes more cycles; the "stops no later" advantage of §6 is a property of the α=0\alpha=0 case.

7.4 No repair is needed, and reachability is rejected as a metric. Termination remains a pure-information question over the full candidate set; cost enters only the selection. A reachable-set variant mkreach=max⁡j∈Fksk,jm_k^{\mathrm{reach}}=\max_{j\in F_k}s_{k,j} is rejected because feasibility is pose-dependent and re-evaluated every cycle, so FkF_k changes continually. Such a variant would (i) destroy monotonicity, since a high-IG view re-entering FkF_k raises the maximum over a changing index set, and (ii) couple termination to transient kinematics, risking false convergence when informative views are momentarily unreachable. Convergence is a statement about the information state, which is pose-independent; reachability and cost govern routing, never sufficiency.

7.5 The lingering-view effect is correct conservatism, not a defect. An expensive or unreachable high-IG view keeps mkm_k high and defers the early stop, which is appropriate: if substantial information remains anywhere, the target has not converged. The effect is bounded (≤N0\le N_0) and self-resolving, since such a view's gain usually decays through incidental observation, and once FkF_k empties the fallback selects it and DubinsClient (ForceSuccess-wrapped) drives through. The only residual cost is a drift toward exhaustive coverage on pathological targets.


8. Summary

The information gain is a visibility-coverage proxy that is dominantly, but not provably, monotone. The convergence metric is correspondingly a running-peak-normalized, patience-debounced approximate non-expansion, with pool exhaustion as its only assumption-free guarantee. Under pure greedy selection the maximum-based rule is self-consistent with the policy and stops no later than a sum-based rule. The cost-informed variant leaves the metric valid and monotone but no longer policy-driven: cost reshapes which view is visited, never whether the target is complete.