symforce.opt.objectives.prior_value_objective module#

class PriorValueObjective[source]#

Bases: TimestepObjective

class ExtraValues(unwhitened_residual)[source]#

Bases: object

Parameters:

unwhitened_residual (Matrix) –

unwhitened_residual#

The tangent-space error between actual and desired.

Type:

symforce.geo.matrix.Matrix

unwhitened_residual: Matrix#
static residual_at_timestep(actual, desired, information_diag, epsilon, cost_scaling=1)[source]#

Returns the residual block for the given timestep, where the residual is computed as the weighted tangent-space difference between actual and desired.

Parameters:
  • actual (Any) – Typically an element to be optimized in the optimization problem.

  • desired (Any) – The desired value of the element to be optimized, or equivalently the prior we have on actual.

  • information_diag (Sequence[float]) – List of scalars defining how each element of the tangent-space vector representing the transform between actual and desired is weighted. For example, if actual and desired are 3D positions represented by sf.V3 objects, the first, second, and third elements of information_diag represent how the x, y, and z errors are weighted.

  • epsilon (float) – A small number used to avoid singularities.

  • cost_scaling (float) – Optional scaling parameter. Corresponds to multiplying the cost in the overall optimization problem by a constant.

Return type:

ResidualBlock

Params: Dataclass#