pub struct VisualizationConfig {Show 20 fields
pub show_cameras: bool,
pub show_landmarks: bool,
pub show_se2_poses: bool,
pub show_plots: bool,
pub show_matrices: bool,
pub camera_fov: f32,
pub camera_aspect_ratio: f32,
pub camera_frustum_scale: f32,
pub landmark_point_size: f32,
pub initial_landmark_color: [u8; 3],
pub optimized_landmark_color: [u8; 3],
pub se2_pose_radius: f32,
pub se2_box_half_size: f32,
pub initial_se2_color: [u8; 3],
pub optimized_se2_color: [u8; 3],
pub hessian_downsample_size: usize,
pub gradient_bar_width: usize,
pub graph_scale: f32,
pub invert_camera_poses: bool,
pub visualization_mode: VisualizationMode,
}Expand description
Configuration for visualization options in RerunObserver.
This struct controls what elements are visualized and their appearance. Use the builder pattern to customize settings.
§Examples
use apex_solver::observers::VisualizationConfig;
// Default: show everything
let config = VisualizationConfig::new();
// Cameras only with larger frustums
let config = VisualizationConfig::cameras_only()
.with_camera_fov(0.8)
.with_camera_frustum_scale(2.0);
// Landmarks only with larger points
let config = VisualizationConfig::landmarks_only()
.with_landmark_point_size(0.05);
// Bundle adjustment preset
let config = VisualizationConfig::for_bundle_adjustment();Fields§
§show_cameras: boolShow camera poses (SE3 variables) as frustums
show_landmarks: boolShow 3D landmarks (Rn with dim=3) as point cloud
show_se2_poses: boolShow SE2 poses (for 2D SLAM)
show_plots: boolShow time series plots (cost, gradient, damping, etc.)
show_matrices: boolShow matrix visualizations (Hessian, gradient)
camera_fov: f32Camera frustum field of view in radians (default: 0.5)
camera_aspect_ratio: f32Camera frustum aspect ratio (default: 1.0)
camera_frustum_scale: f32Scale factor for camera frustum size (default: 1.0)
landmark_point_size: f32Radius of 3D landmark points (default: 0.02)
initial_landmark_color: [u8; 3]Color for initial landmarks RGB (default: blue [100, 150, 255])
optimized_landmark_color: [u8; 3]Color for optimized landmarks RGB (default: gold [255, 200, 50])
se2_pose_radius: f32Radius for SE2 pose markers (default: 0.5)
se2_box_half_size: f32Half-size for SE2 pose box markers (default: 0.3)
initial_se2_color: [u8; 3]Color for initial SE2 poses RGB (default: blue [100, 150, 255])
optimized_se2_color: [u8; 3]Color for optimized SE2 poses RGB (default: green [50, 200, 100])
hessian_downsample_size: usizeTarget size for Hessian downsampling (default: 100)
gradient_bar_width: usizeTarget width for gradient visualization (default: 100)
graph_scale: f32Graph scale factor for pose graph visualization
invert_camera_poses: boolInvert camera poses for display (T_wc -> T_cw for BA)
visualization_mode: VisualizationModeVisualization mode: iterative or initial-and-final only
Implementations§
Source§impl VisualizationConfig
impl VisualizationConfig
Sourcepub fn with_show_cameras(self, show: bool) -> Self
pub fn with_show_cameras(self, show: bool) -> Self
Set whether to show camera poses (SE3 frustums).
Sourcepub fn with_show_landmarks(self, show: bool) -> Self
pub fn with_show_landmarks(self, show: bool) -> Self
Set whether to show 3D landmarks.
Sourcepub fn with_show_se2_poses(self, show: bool) -> Self
pub fn with_show_se2_poses(self, show: bool) -> Self
Set whether to show SE2 poses.
Sourcepub fn with_show_plots(self, show: bool) -> Self
pub fn with_show_plots(self, show: bool) -> Self
Set whether to show time series plots.
Sourcepub fn with_show_matrices(self, show: bool) -> Self
pub fn with_show_matrices(self, show: bool) -> Self
Set whether to show matrix visualizations.
Sourcepub fn with_camera_fov(self, fov: f32) -> Self
pub fn with_camera_fov(self, fov: f32) -> Self
Set camera frustum field of view in radians.
Sourcepub fn with_camera_aspect_ratio(self, ratio: f32) -> Self
pub fn with_camera_aspect_ratio(self, ratio: f32) -> Self
Set camera frustum aspect ratio.
Sourcepub fn with_camera_frustum_scale(self, scale: f32) -> Self
pub fn with_camera_frustum_scale(self, scale: f32) -> Self
Set camera frustum scale factor.
Sourcepub fn with_landmark_point_size(self, size: f32) -> Self
pub fn with_landmark_point_size(self, size: f32) -> Self
Set 3D landmark point size/radius.
Sourcepub fn with_initial_landmark_color(self, rgb: [u8; 3]) -> Self
pub fn with_initial_landmark_color(self, rgb: [u8; 3]) -> Self
Set color for initial landmarks (RGB).
Sourcepub fn with_optimized_landmark_color(self, rgb: [u8; 3]) -> Self
pub fn with_optimized_landmark_color(self, rgb: [u8; 3]) -> Self
Set color for optimized landmarks (RGB).
Sourcepub fn with_se2_pose_radius(self, radius: f32) -> Self
pub fn with_se2_pose_radius(self, radius: f32) -> Self
Set SE2 pose marker radius.
Sourcepub fn with_se2_box_half_size(self, half_size: f32) -> Self
pub fn with_se2_box_half_size(self, half_size: f32) -> Self
Set SE2 pose box half-size.
Sourcepub fn with_initial_se2_color(self, rgb: [u8; 3]) -> Self
pub fn with_initial_se2_color(self, rgb: [u8; 3]) -> Self
Set color for initial SE2 poses (RGB).
Sourcepub fn with_optimized_se2_color(self, rgb: [u8; 3]) -> Self
pub fn with_optimized_se2_color(self, rgb: [u8; 3]) -> Self
Set color for optimized SE2 poses (RGB).
Sourcepub fn with_hessian_downsample_size(self, size: usize) -> Self
pub fn with_hessian_downsample_size(self, size: usize) -> Self
Set target size for Hessian downsampling.
Sourcepub fn with_gradient_bar_width(self, width: usize) -> Self
pub fn with_gradient_bar_width(self, width: usize) -> Self
Set target width for gradient visualization.
Sourcepub fn with_graph_scale(self, scale: f32) -> Self
pub fn with_graph_scale(self, scale: f32) -> Self
Set graph scale factor.
Sourcepub fn with_invert_camera_poses(self, invert: bool) -> Self
pub fn with_invert_camera_poses(self, invert: bool) -> Self
Set whether to invert camera poses (T_wc -> T_cw).
Sourcepub fn with_visualization_mode(self, mode: VisualizationMode) -> Self
pub fn with_visualization_mode(self, mode: VisualizationMode) -> Self
Sourcepub fn cameras_only() -> Self
pub fn cameras_only() -> Self
Create a configuration that shows only camera poses (no landmarks).
Useful for pose graph visualization or when landmarks are too dense.
Sourcepub fn landmarks_only() -> Self
pub fn landmarks_only() -> Self
Create a configuration that shows only 3D landmarks (no cameras).
Useful for structure-from-motion point cloud visualization.
Sourcepub fn for_bundle_adjustment() -> Self
pub fn for_bundle_adjustment() -> Self
Create a configuration optimized for bundle adjustment.
- Inverts camera poses (T_wc -> T_cw for correct display)
- Disables SE2 poses (not used in BA)
Sourcepub fn for_pose_graph() -> Self
pub fn for_pose_graph() -> Self
Create a configuration optimized for pose graph optimization.
- No camera pose inversion (poses are already T_cw)
- Disables landmarks (pose graphs don’t have 3D points)
Trait Implementations§
Source§impl Clone for VisualizationConfig
impl Clone for VisualizationConfig
Source§fn clone(&self) -> VisualizationConfig
fn clone(&self) -> VisualizationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VisualizationConfig
impl Debug for VisualizationConfig
Auto Trait Implementations§
impl Freeze for VisualizationConfig
impl RefUnwindSafe for VisualizationConfig
impl Send for VisualizationConfig
impl Sync for VisualizationConfig
impl Unpin for VisualizationConfig
impl UnsafeUnpin for VisualizationConfig
impl UnwindSafe for VisualizationConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.