navlie.batch.gaussian_mixtures.MaxMixtureResidual¶
- class navlie.batch.gaussian_mixtures.MaxMixtureResidual(errors: List[Residual], weights: List[float])¶
Bases:
GaussianMixtureResidual
Based on the following reference, @article{olson2013inference, title={Inference on networks of mixtures for robust robot mapping}, author={Olson, Edwin and Agarwal, Pratik}, journal={The International Journal of Robotics Research}, volume={32}, number={7}, pages={826–840}, year={2013}, publisher={SAGE Publications Sage UK: London, England} }
- Parameters:
- mix_errors(error_value_list: List[ndarray], sqrt_info_matrix_list: List[ndarray]) → Tuple[ndarray, Dict]¶
Each mixture must implement this method.. Compute the factor error from the errors corresponding to each component
All errors are assumed to be normalized and have identity covariance.
- Parameters:
error_value_list (List[np.ndarray],) – List of errors corresponding to each component
- mix_jacobians(error_value_list: List[ndarray], jacobian_list_of_lists: List[List[ndarray]], sqrt_info_matrix_list: List[ndarray], reused_values: Dict | None = None) → Tuple[ndarray, List[ndarray]]¶
Each mixture must implement this method. For every state, compute Jacobian of the Gaussian mixture w.r.t. that state
- Parameters:
error_value_list (List[np.ndarray],) – List of errors corresponding to each component
jacobian_list (List[List[np.ndarray]]) – Outer list corresponds to each component, for each of which the inner list contains the component Jacobians w.r.t. every state.
- evaluate(states: List[State], compute_jacobians: List[bool] | None = None) → Tuple[ndarray, List[ndarray]]¶
Evaluates the residual and Jacobians.
- evaluate_component_residuals(states: List[State], compute_jacobians: List[bool] | None = None) → Tuple[List[ndarray], List[List[ndarray]], List[ndarray]]¶
- jacobian_fd(states: List[State], step_size=1e-06) → List[ndarray]¶
Calculates the model jacobian with finite difference.
- Parameters:
states (List[State]) – Evaluation point of Jacobians, a list of states that the residual is a function of.
- Returns:
A list of Jacobians of the measurement model with respect to each of the input states. For example, the first element of the return list is the Jacobian of the residual w.r.t states[0], the second element is the Jacobian of the residual w.r.t states[1], etc.
- Return type:
List[np.ndarray]