1 pose_generation.positional_sampling

pose_generation.positional_sampling

Direction and position sampling utilities for finite candidate generation.

This module samples candidate camera centers in the reference rig frame before they are transformed into world coordinates. It owns only the center prior: orientation, feasibility pruning, and candidate-table compaction are handled by neighboring pose_generation modules.

1.1 Theory

Raw directions are sampled either uniformly on the sphere, \(u \sim \mathrm{Unif}(\mathbb{S}^2)\), or from a forward-biased PowerSpherical distribution, \(p(u) \propto (1 + e_z^\top u)^\kappa\). Azimuth caps scale \(\psi=\operatorname{atan2}(u_x,u_z)\) into the configured field \(\Delta\psi\), while elevation caps map \(u_y=\sin\theta\) into \([\sin\theta_{\min},\sin\theta_{\max}]\) without rejection. A radius \(r\sim\mathcal{U}(r_{\min},r_{\max})\) then produces the reference-frame offset \(o_r=r d_r\) and world center \(c_w=T^w_r o_r\).

Position modes reinterpret the capped direction before the radius is applied. forward_local, local_refinement, and revisit_backtrack blend toward continuity priors; target_bearing_local blends toward the selected actor-visible target bearing; target_orbit makes balanced partial arcs at the current horizontal target standoff; lateral_target_bypass combines target bearing, signed lateral bypass, and bounded vertical offset. These target modes may use actor-visible target centers only, never GT target geometry.

1.2 Classes

Name Description
PositionSampler Sample candidate centers around a reference pose.

1.2.1 PositionSampler

pose_generation.positional_sampling.PositionSampler(config, *, device)

Sample candidate centers around a reference pose.

1.2.1.1 Methods

Name Description
sample Draw candidate centers and offsets in reference frame.
1.2.1.1.1 sample
pose_generation.positional_sampling.PositionSampler.sample(
    reference_pose,
    *,
    count,
    target_center_world,
)

Draw candidate centers and offsets in reference frame.

1.2.1.1.1.1 Parameters
Name Type Description Default
reference_pose PoseTW PoseTW reference2world pose used as sampling origin. required
count int Exact number of centers to attempt. required
target_center_world torch.Tensor | None Request-local actor-visible target, when required by the center family. required
1.2.1.1.1.2 Returns
Name Type Description
torch.Tensor Tuple of (centers_world, offsets_ref) where both are Tensor[N, 3] with
torch.Tensor N = count. Offsets are in the reference frame before rotation into world.
Back to top