32#include "reusex/segmentation/Surfel.hpp"
33#include "reusex/segmentation/surfel_extraction.hpp"
34#include "reusex/slam/LoopClosure.hpp"
35#include "reusex/slam/PanoramaLoopEdges.hpp"
119std::vector<OdometrySigmaScale>
121 double min_scale,
double max_scale);
485 const std::vector<LoopEdge> &loop_edges = {})
const;
507 bool dry_run =
false);
PlaneGraphOptimizer(PlaneGraphOptions options)
PlaneGraphResult optimize(std::vector< FrameSurfels > &frames, const std::vector< LoopEdge > &loop_edges={}) const
Globally optimize the world poses of the given frames in place (each FrameSurfels::world_pose is upda...
OdometryNoiseModel
How the per-edge measurement noise of the consecutive-frame odometry BetweenFactors is derived (#225 ...
@ motion
Sigma proportional to the edge's OWN seed motion, normalised by the median motion over the run: a fra...
@ fixed
Every edge gets odometry_sigma_rot / odometry_sigma_trans unscaled (modulo the observability guard).
PlaneGraphResult optimize_sensor_poses(ProjectDB &db, const PlaneGraphOptions &options, bool dry_run=false)
High-level entry point: extract surfels for every sensor frame in db, globally optimize their poses v...
std::vector< OdometrySigmaScale > odometry_motion_scales(const std::vector< OdometryEdgeMotion > &motion, double min_scale, double max_scale)
Per-edge sigma scales for OdometryNoiseModel::motion.
PlaneNoiseModel
How the measurement noise of an individual plane observation is chosen.
@ fit_geometry
Sigmas derived from the fit statistics of each detection — its inlier count, its point-to-plane resid...
@ inlier_count
Legacy (pre-#225 round 4): sigma *= clamp(sqrt(median_N / N), min, max), the SAME scalar on both the ...
@ uniform
Every observation gets plane_sigma_* unscaled.
PlaneFitSigmas plane_fit_sigmas(const PlaneFitQuality &q)
Standard first-order uncertainty of a least-squares plane fit through q .inliers points with point no...
Parameters for wide-baseline loop-edge detection.
Seed motion of one consecutive-frame odometry edge.
double rotation
relative rotation angle of the seed pair (rad)
double translation
|t_i+1 - t_i| in the seed trajectory (m)
Multiplicative scale applied to an odometry edge's base sigmas.
Parameters for panorama-derived loop-edge detection.
Fit statistics of one per-frame plane detection: the inputs from which the measurement noise of its O...
int inliers
supporting surfel count of the fit
double residual_rms
RMS point-to-plane distance of the inliers (m).
double extent_minor
RMS in-plane extent along the weaker of the two principal in-plane axes (m).
Statistical standard deviations of a plane fit, in the units of the OrientedPlane3Factor residual.
double normal
normal-tilt std (rad)
double distance
plane-offset std (m)
Parameters for plane-landmark pose-graph optimization.
PanoramaLoopOptions panorama_loops
Panorama-derived wide-baseline loop edges (issue #236; off by default, --use-panoramas).
float odometry_sigma_rot
odometry rotation std (rad)
float odometry_weight_min
min per-edge sigma scale (motion)
int ransac_iterations
RANSAC hypotheses per plane.
float ransac_normal_angle
inlier normal agreement threshold (deg)
bool use_gnc
wrap LM in Graduated Non-Convexity
std::string loop_edges_file
Optional path to a JSON file of externally-computed loop edges (schema "reusex.loop_edges....
float assoc_round_tol
stop rounds when max pose shift < this (m)
int min_landmark_observations
landmark must be seen by >= this many frames
float assoc_overlap_margin
Overlap gate: two observations may only merge into the same landmark if their in-plane footprints ove...
float assoc_distance
max plane-offset difference to merge (m)
OdometryNoiseModel odometry_noise_model
Which per-edge noise model weights the odometry factors (#225).
double loop_edges_min_seed_disagreement_fraction
Scale-relative seed-disagreement gate for external edges, as a fraction of the seed trajectory's exte...
int max_iterations
LM (inner) iteration cap.
float odometry_gnc_inlier_cost
GNC-TLS inlier threshold for odometry factors when odometry_robust is set.
LoopClosureOptions loop_closure
P2 wide-baseline loop closure (off by default).
float plane_sigma_normal
plane-normal measurement std (rad)
bool odometry_robust
Let GNC down-weight individual odometry edges instead of registering every one as a known inlier.
float plane_sigma_distance
plane-distance measurement std (m)
float plane_weight_max
max sigma scale (weakest planes)
int assoc_rounds
Number of (associate at current poses -> optimize -> refit) rounds.
float underconstrained_odom_scale
Observability guard: a frame whose landmark observations span fewer than two independent normal direc...
float min_landmark_spread_ratio
Reject landmarks whose observation inlier-centroids are near-collinear: if the second singular value ...
bool use_plane_factors
Build the graph WITHOUT any plane factors — the plane_sigma_scale -> infinity limit,...
bool loop_edges_trusted
How loop-edge factors are treated by the solver: false (default, SAFE): loop edges are ordinary GNC c...
float prior_sigma_trans
first-pose gauge prior translation std (m)
SurfelExtractionParams surfel
Surfel extraction settings.
double loop_edges_min_seed_disagreement
Seed-disagreement gate for the external (loop_edges_file) edges, mirroring LoopClosureOptions::min_se...
float plane_weight_min
Clamp on the per-observation sigma scale, applied to whichever model is selected.
int max_planes_per_frame
keep at most this many planes per frame
float odometry_weight_max
max per-edge sigma scale (motion)
int min_plane_inliers
reject planes with fewer inliers
float gnc_inlier_cost
GNC TLS inlier threshold on the factor error (0.5 * whitened squared residual).
float prior_sigma_rot
first-pose gauge prior rotation std (rad)
unsigned seed
RANSAC seed (STANDARDS.md §6).
float loop_trust_inlier_cost
GNC-TLS inlier threshold applied ONLY to loop-edge factors when loop_edges_trusted is set (same units...
float assoc_normal_angle
max normal angle to merge (deg)
float plane_sigma_scale
Global multiplier on BOTH plane sigmas, i.e.
PlaneNoiseModel plane_noise_model
Which per-observation noise model weights the plane factors.
float odometry_sigma_trans
odometry translation std (m)
float ransac_distance
inlier point-to-plane distance (m)
Summary statistics from a plane-graph optimization run.
double max_pose_shift
largest per-frame translation change (m)
int landmarks_rejected_overlap
merges blocked by the overlap gate
int landmarks
persistent landmarks entering the graph
int plane_noise_clamped_high
bool converged
optimizer produced a solution
double final_error
factor-graph error after optimization
int landmarks_rejected_degenerate
landmarks dropped as near-collinear
int frames
frames that participated
double median_fit_sigma_normal
Median fit sigmas across all detections, the values the scales are normalised by (0 under PlaneNoiseM...
int panorama_loop_edges
Of loop_edges, how many came from the panorama front-end (#236).
int rounds
association/optimization rounds actually performed
int planes_detected
total per-frame plane detections
int plane_noise_clamped_low
Observations whose noise scale hit plane_weight_min (trusted as hard as the model allows) and plane_w...
int plane_factors
OrientedPlane3 observation factors.
double initial_error
factor-graph error before optimization
double median_fit_sigma_distance
m
int underconstrained_frames
frames whose odometry was tightened
int loop_edges
wide-baseline loop BetweenFactors added
int iterations
optimizer iterations performed