navlie

  • Home
  • Tutorial
  • API
  • navlie.composite
    • navlie.composite.CompositeInput
    • navlie.composite.CompositeMeasurement
    • navlie.composite.CompositeMeasurementModel
    • navlie.composite.CompositeProcessModel
    • navlie.composite.CompositeState
  • navlie.datagen
    • navlie.datagen.generate_measurement
    • navlie.datagen.DataGenerator
  • navlie.filters
    • navlie.filters.check_outlier
    • navlie.filters.generate_sigmapoints
    • navlie.filters.mean_state
    • navlie.filters.run_filter
    • navlie.filters.run_gsf_filter
    • navlie.filters.run_imm_filter
    • navlie.filters.CubatureKalmanFilter
    • navlie.filters.ExtendedKalmanFilter
    • navlie.filters.GaussHermiteKalmanFilter
    • navlie.filters.GaussianSumFilter
    • navlie.filters.InteractingModelFilter
    • navlie.filters.IteratedKalmanFilter
    • navlie.filters.SigmaPointKalmanFilter
    • navlie.filters.UnscentedKalmanFilter
  • navlie.types
    • navlie.types.Dataset
    • navlie.types.Input
    • navlie.types.Measurement
    • navlie.types.MeasurementModel
    • navlie.types.ProcessModel
    • navlie.types.State
    • navlie.types.StateWithCovariance
  • navlie.utils
    • navlie.utils.alignment
      • navlie.utils.alignment.associate_and_align_trajectories
      • navlie.utils.alignment.evo_traj_to_state_list
      • navlie.utils.alignment.state_list_to_evo_traj
    • navlie.utils.common
      • navlie.utils.common.associate_stamps
      • navlie.utils.common.find_nearest_stamp_idx
      • navlie.utils.common.jacobian
      • navlie.utils.common.load_tum_trajectory
      • navlie.utils.common.monte_carlo
      • navlie.utils.common.randvec
      • navlie.utils.common.schedule_sequential_measurements
      • navlie.utils.common.state_interp
      • navlie.utils.common.van_loans
      • navlie.utils.common.GaussianResult
      • navlie.utils.common.GaussianResultList
      • navlie.utils.common.MixtureResult
      • navlie.utils.common.MixtureResultList
      • navlie.utils.common.MonteCarloResult
    • navlie.utils.mixture
      • navlie.utils.mixture.gaussian_mixing
      • navlie.utils.mixture.gaussian_mixing_vectorspace
      • navlie.utils.mixture.reparametrize_gaussians_about_X_par
      • navlie.utils.mixture.update_X
    • navlie.utils.plot
      • navlie.utils.plot.plot_camera_poses
      • navlie.utils.plot.plot_error
      • navlie.utils.plot.plot_meas
      • navlie.utils.plot.plot_meas_by_model
      • navlie.utils.plot.plot_nees
      • navlie.utils.plot.plot_poses
      • navlie.utils.plot.set_axes_equal
      • navlie.utils.plot.CameraPoseVisualizer
  • navlie.batch
    • navlie.batch.estimator
      • navlie.batch.estimator.BatchEstimator
    • navlie.batch.gaussian_mixtures
      • navlie.batch.gaussian_mixtures.GaussianMixtureResidual
      • navlie.batch.gaussian_mixtures.HessianSumMixtureResidual
      • navlie.batch.gaussian_mixtures.MaxMixtureResidual
      • navlie.batch.gaussian_mixtures.MaxSumMixtureResidual
      • navlie.batch.gaussian_mixtures.SumMixtureResidual
    • navlie.batch.losses
      • navlie.batch.losses.CauchyLoss
      • navlie.batch.losses.L2Loss
      • navlie.batch.losses.LossFunction
    • navlie.batch.problem
      • navlie.batch.problem.OptimizationSummary
      • navlie.batch.problem.Problem
    • navlie.batch.residuals
      • navlie.batch.residuals.MeasurementResidual
      • navlie.batch.residuals.PriorResidual
      • navlie.batch.residuals.ProcessResidual
      • navlie.batch.residuals.Residual
  • navlie.lib
    • navlie.lib.camera
      • navlie.lib.camera.PinholeCamera
      • navlie.lib.camera.PoseMatrix
    • navlie.lib.datasets
      • navlie.lib.datasets.generate_landmark_positions
      • navlie.lib.datasets.SimulatedInertialGPSDataset
      • navlie.lib.datasets.SimulatedInertialLandmarkDataset
      • navlie.lib.datasets.SimulatedPoseRangingDataset
    • navlie.lib.imu
      • navlie.lib.imu.G_matrix
      • navlie.lib.imu.G_matrix_inv
      • navlie.lib.imu.L_matrix
      • navlie.lib.imu.M_matrix
      • navlie.lib.imu.N_matrix
      • navlie.lib.imu.U_matrix
      • navlie.lib.imu.U_matrix_inv
      • navlie.lib.imu.U_tilde_matrix
      • navlie.lib.imu.adjoint_IE3
      • navlie.lib.imu.delta_matrix
      • navlie.lib.imu.get_unbiased_imu
      • navlie.lib.imu.inverse_IE3
      • navlie.lib.imu.IMU
      • navlie.lib.imu.IMUKinematics
      • navlie.lib.imu.IMUState
    • navlie.lib.models
      • navlie.lib.models.AbsolutePosition
      • navlie.lib.models.AbsoluteVelocity
      • navlie.lib.models.Altitude
      • navlie.lib.models.BodyFrameVelocity
      • navlie.lib.models.CameraProjection
      • navlie.lib.models.DoubleIntegrator
      • navlie.lib.models.DoubleIntegratorWithBias
      • navlie.lib.models.GlobalPosition
      • navlie.lib.models.Gravitometer
      • navlie.lib.models.InvariantMeasurement
      • navlie.lib.models.InvariantPointRelativePosition
      • navlie.lib.models.LinearMeasurement
      • navlie.lib.models.Magnetometer
      • navlie.lib.models.OneDimensionalPositionVelocityRange
      • navlie.lib.models.PointRelativePosition
      • navlie.lib.models.PointRelativePositionSLAM
      • navlie.lib.models.RangePointToAnchor
      • navlie.lib.models.RangePoseToAnchor
      • navlie.lib.models.RangePoseToPose
      • navlie.lib.models.RangeRelativePose
      • navlie.lib.models.RelativeBodyFrameVelocity
      • navlie.lib.models.SingleIntegrator
    • navlie.lib.preintegration
      • navlie.lib.preintegration.AngularVelocityIncrement
      • navlie.lib.preintegration.BodyVelocityIncrement
      • navlie.lib.preintegration.IMUIncrement
      • navlie.lib.preintegration.LinearIncrement
      • navlie.lib.preintegration.PreintegratedAngularVelocity
      • navlie.lib.preintegration.PreintegratedBodyVelocity
      • navlie.lib.preintegration.PreintegratedIMUKinematics
      • navlie.lib.preintegration.PreintegratedLinearModel
      • navlie.lib.preintegration.PreintegratedWheelOdometry
      • navlie.lib.preintegration.RelativeMotionIncrement
      • navlie.lib.preintegration.WheelOdometryIncrement
    • navlie.lib.states
      • navlie.lib.states.MatrixLieGroupState
      • navlie.lib.states.MixtureState
      • navlie.lib.states.SE23State
      • navlie.lib.states.SE2State
      • navlie.lib.states.SE3State
      • navlie.lib.states.SL3State
      • navlie.lib.states.SO2State
      • navlie.lib.states.SO3State
      • navlie.lib.states.StampedValue
      • navlie.lib.states.VectorInput
      • navlie.lib.states.VectorState
  • navlie.bspline
    • navlie.bspline.SE3Bspline
On this page
  • GaussianResultList
    • GaussianResultList.stamp
    • GaussianResultList.state
    • GaussianResultList.state_true
    • GaussianResultList.covariance
    • GaussianResultList.error
    • GaussianResultList.ees
    • GaussianResultList.rmse
    • GaussianResultList.nees
    • GaussianResultList.md
    • GaussianResultList.three_sigma
    • GaussianResultList.value
    • GaussianResultList.dof
    • GaussianResultList.value_true
    • GaussianResultList.nees_lower_bound()
    • GaussianResultList.nees_upper_bound()
    • GaussianResultList.from_estimates()

navlie.utils.common.GaussianResultList¶

class navlie.utils.common.GaussianResultList(result_list: List[GaussianResult])¶

Bases: object

A data container that accepts a list of GaussianResult objects and stacks the attributes in numpy arrays. Convenient for plotting. This object does nothing more than array-ifying the attributes of GaussianResult.

This object also supports slicing, which will return a new GaussianResultList object with the sliced attributes either through time or through the degrees of freedom themselves. For example,

results = GaussianResultList.from_estimates(estimates, state_true_list)

results[0:10] # returns the first 10 time steps
results[:, 0] # returns the first degree of freedom
results[0:10, 0] # returns the first degree of freedom for the first 10 time steps
results[0:10, [0, 1]] # returns the first two degrees of freedom for the first 10 time steps
results[:, 3:] # returns all degrees of freedom except the first three

This can be very useful if you want to examine the nees or rmse of just some states, or if you want to plot the error of just some states. For example, if you have an SE3State, where the first 3 degrees of freedom are attitude, and the last 3 are position, you can plot only the attitude error with

nav.plot_error(results[:, 0:3])

and likewise get only the attitude NEES with results[:, 0:3].nees.

Parameters:

result_list (List[GaussianResult]) – A list of GaussianResult, intended such that each element corresponds to a different time point

Let N = len(result_list)

stamp¶

timestamp

Type:

numpy.ndarray with shape (N,)

state: List[State]¶

numpy array of State objects

Type:

numpy.ndarray with shape (N,)

state_true: List[State]¶

numpy array of true State objects

Type:

numpy.ndarray with shape (N,)

covariance: ndarray¶

covariance

Type:

numpy.ndarray with shape (N,dof,dof)

error¶

error throughout trajectory

Type:

numpy.ndarray with shape (N, dof)

ees¶

EES throughout trajectory

Type:

numpy.ndarray with shape (N,)

rmse¶

EES throughout trajectory

Type:

numpy.ndarray with shape (N,)

nees¶

NEES throughout trajectory

Type:

numpy.ndarray with shape (N,)

md¶

Mahalanobis distance throughout trajectory

Type:

numpy.ndarray with shape (N,)

three_sigma¶

three-sigma bounds

Type:

numpy.ndarray with shape (N, dof)

value¶

state value. type depends on implementation

Type:

numpy.ndarray with shape (N,)

dof¶

dof throughout trajectory

Type:

numpy.ndarray with shape (N,)

value_true¶

true state value. type depends on implementation

Type:

numpy.ndarray with shape (N,)

nees_lower_bound(confidence_interval: float)¶

Calculates the NEES lower bound throughout the trajectory.

Parameters:

confidence_interval (float) – Single-sided cumulative probability threshold that defines the bound. Must be between 0 and 1

Returns:

NEES value corresponding to confidence interval

Return type:

numpy.ndarray with shape (N,)

An example of how to make a NEES plot with both upper and lower bounds:

ax.plot(results.stamp, results.nees)
ax.plot(results.stamp, results.nees_lower_bound(0.99))
ax.plot(results.stamp, results.nees_upper_bound(0.99))
nees_upper_bound(confidence_interval: float, double_sided=True)¶

Calculates the NEES upper bound throughout the trajectory

Parameters:
  • confidence_interval (float) – Cumulative probability threshold that defines the bound. Must be between 0 and 1.

  • double_sided (bool, optional) – Whether the provided threshold is single-sided or double sided, by default True

Returns:

  • numpy.ndarray with shape (N,) – NEES value corresponding to confidence interval

  • An example of how to make a NEES plot with only upper bounds

  • .. code-block:: python – ax.plot(results.stamp, results.nees) ax.plot(results.stamp, results.nees_upper_bound(0.99, double_sided=False))

static from_estimates(estimate_list: List[StateWithCovariance], state_true_list: List[State], method='nearest')¶

A convenience function that creates a GaussianResultList from a list of StateWithCovariance and a list of true State objects

Parameters:
  • estimate_list (List[StateWithCovariance]) – A list of StateWithCovariance objects

  • state_true_list (List[State]) – A list of true State objects

  • method ("nearest" or "linear", optional) – The method used to interpolate the true state when the timestamps do not line up exactly, by default “nearest”.

Returns:

A GaussianResultList object

Return type:

GaussianResultList

previous

navlie.utils.common.GaussianResult

next

navlie.utils.common.MixtureResult

© Copyright 2022.

Created using Sphinx 7.1.2.