1 CandidateViewGenerator
pose_generation.candidate_generation.CandidateViewGenerator(config)Generate candidate PoseTW around a reference rig pose using composeable and modular rules.
This class orchestrates the full candidate generation process:
- positional sampling via
PositionSampler, - orientation construction via
OrientationBuilder, and - rule-based pruning via
FreeSpaceRule,MinDistanceToMeshRuleandPathCollisionRule.
1.1 Methods
| Name | Description |
|---|---|
| generate_from_typed_sample | Generate candidates using an EfmSnippetView sample. |
| generate | Sample candidate poses around reference_pose and apply pruning rules. |
1.1.1 generate_from_typed_sample
pose_generation.candidate_generation.CandidateViewGenerator.generate_from_typed_sample(
sample,
frame_index=None,
runtime_context=None,
)Generate candidates using an EfmSnippetView sample.
1.1.1.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sample | EfmSnippetView | Snippet view with trajectory and mesh. | required |
| frame_index | int | None | Optional frame index to extract the reference pose instead of using the final pose. 0 <= frame_index < F where is the number of frames in the snippet; F = sample.get_camera(self.config.camera_label).num_frames. | None |
| runtime_context | CandidateGenerationRuntimeContext | None | Optional target/runtime context accepted for interface compatibility with mixture generators. The single-family generator reads target state directly from the config. | None |
1.1.2 generate
pose_generation.candidate_generation.CandidateViewGenerator.generate(
reference_pose,
gt_mesh,
mesh_verts,
mesh_faces,
camera_calib_template,
occupancy_extent,
runtime_context=None,
)Sample candidate poses around reference_pose and apply pruning rules.
Samples candidate positions and orientations, wraps them in a CandidateContext, runs all configured rules, and returns CandidateSamplingResult.
1.1.2.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| reference_pose | PoseTW | World<-reference PoseTW used as the physical rig pose. When align_to_gravity is enabled, a gravity-aligned copy of this pose defines the sampling frame (stored in CandidateSamplingResult.sampling_pose). |
required |
| gt_mesh | trimesh.Trimesh | Ground-truth trimesh.Trimesh in the world frame for pruning. |
required |
| mesh_verts | torch.Tensor | Tensor['V, 3'] mesh vertices aligned with gt_mesh. |
required |
| mesh_faces | torch.Tensor | Tensor['F, 3'] integer vertex indices defining mesh faces. |
required |
| camera_calib_template | CameraTW | CameraTW whose intrinsics/metadata are cloned for each candidate; its pose block is overwritten with candidate extrinsics. |
required |
| occupancy_extent | torch.Tensor | Tensor['6'] world-space AABB used by FreeSpaceRule. |
required |
| runtime_context | CandidateGenerationRuntimeContext | None | Optional target/runtime context accepted for interface compatibility with mixture generators. The single-family generator reads target state directly from the config. | None |
1.1.2.2 Returns
| Name | Type | Description |
|---|---|---|
| CandidateSamplingResult | CandidateSamplingResult holding the valid candidate CameraTW, reference pose, shell |
|
| CandidateSamplingResult | poses, masks and optional debug statistics. |