Calico
A visual-inertial calibration library designed for rapid problem construction and debugging.
Public Member Functions | List of all members
calico::BatchOptimizer Class Reference

#include <batch_optimizer.h>

Public Member Functions

void AddSensor (sensors::Sensor *sensor, bool take_ownership=true)
 
void AddWorldModel (WorldModel *world_model, bool take_ownership=true)
 
void AddTrajectory (Trajectory *trajectory_world_sensorrig, bool take_ownership=true)
 
absl::StatusOr< ceres::Solver::Summary > Optimize (const ceres::Solver::Options &options=DefaultSolverOptions())
 

Detailed Description

Batch optimizer class. Takes Sensor, WorldModel, and Trajectory objects and adds their parameters to a least-squares optimization problem. Sensor classes also contribute residuals which are functions of WorldModel and Trajectory.

Member Function Documentation

◆ AddSensor()

void calico::BatchOptimizer::AddSensor ( sensors::Sensor sensor,
bool  take_ownership = true 
)

Add a sensor to the optimizer. sensor is a raw pointer, and by default, BatchOptimizer will take ownership of that pointer, so there is no need to de-allocate once BatchOptimizer goes out of scope.

NOTE: If this pointer is owned by a smart pointer or must persist out of the BatchOptimizer scope, pass in take_ownership=false.

◆ AddTrajectory()

void calico::BatchOptimizer::AddTrajectory ( Trajectory trajectory_world_sensorrig,
bool  take_ownership = true 
)

Add a Trajectory to the optimizer. trajectory_world_sensorrig is a raw pointer, and by default, BatchOptimizer will take ownership of that pointer, so there is no need to de-allocate once BatchOptimizer goes out of scope.

NOTE: If this pointer is owned by a smart pointer or must persist out of the BatchOptimizer scope, pass in take_ownership=false.

trajectory_world_sensorrig is the time-parameterized pose of the sensor rig w.r.t. the world origin resolved in the world frame

\[ \mathbf{T}^w_r(t) = \left[\begin{matrix}\mathbf{R}^w_r & \mathbf{t}^w_{wr} \\\mathbf{0}&1\end{matrix}\right] \]

.

◆ AddWorldModel()

void calico::BatchOptimizer::AddWorldModel ( WorldModel world_model,
bool  take_ownership = true 
)

Add a WorldModel to the optimizer. world_model is a raw pointer, and by default, BatchOptimizer will take ownership of that pointer, so there is no need to de-allocate once BatchOptimizer goes out of scope.

NOTE: If this pointer is owned by a smart pointer or must persist out of the BatchOptimizer scope, pass in take_ownership=false.

◆ Optimize()

absl::StatusOr< ceres::Solver::Summary > calico::BatchOptimizer::Optimize ( const ceres::Solver::Options &  options = DefaultSolverOptions())

Run the optimization with solver options. By default, options is DefaultSolverOptions().

options is an unmodified ceres::Solver::Options object. Click the link to see all configurable options.


The documentation for this class was generated from the following files: