symforce.opt.objectives.norm_barrier_objective module#
- class NormBarrierObjective[source]#
Bases:
TimestepObjective
- class Params(norm_nominal, error_nominal, dist_zero_to_nominal)[source]#
Bases:
object
- dist_zero_to_nominal#
The distance from norm_nominal to the region of zero error. Must be a positive number.
- Type:
- class ExtraValues(unwhitened_residual)[source]#
Bases:
object
- Parameters:
unwhitened_residual (Matrix11) –
- unwhitened_residual#
Error after applying the barrier function but before applying the cost scaling.
- static residual_at_timestep(vector, params, epsilon, cost_scaling=1, power=1)[source]#
Returns the residual block for the given timestep, where the residual is computed by applying a max barrier function to the norm of the given vector, and then optionally scaling the corresponding cost in the overall optimization problem by
cost_scaling
.- Parameters:
vector (Matrix) – Vector whose norm we wish to apply a barrier to.
params (Params) – Parameters defining the barrier function.
power (float) – Power of the barrier function. Defaults to 1, producing a linear barrier function in the residual, which corresponds to a quadratic cost in the overall optimization problem.
cost_scaling (float) – Optional scaling parameter. Corresponds to multiplying the cost in the overall optimization problem by a constant.
epsilon (float) –
- Return type: