navlie.batch.residuals.PriorResidual¶
- class navlie.batch.residuals.PriorResidual(keys: List[Hashable], prior_state: State, prior_covariance: ndarray)¶
Bases:
Residual
A generic prior error.
- evaluate(states: List[State], compute_jacobians: List[bool] | None = None) → Tuple[ndarray, List[ndarray]]¶
Evaluates the prior error of the form
e = x.minus(x0),
where \(\mathbf{x}\) is our operating point and \(\mathbf{x}_0\) is a prior guess.
- 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]