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

#include <world_model.h>

Public Member Functions

absl::Status AddLandmark (Landmark *landmark, bool take_ownership=true)
 
absl::Status AddRigidBody (RigidBody *rigidbody, bool take_ownership=true)
 
int AddParametersToProblem (ceres::Problem &problem)
 
const absl::flat_hash_map< int, std::unique_ptr< Landmark > > & landmarks () const
 Accessor for landmarks.
 
absl::flat_hash_map< int, std::unique_ptr< Landmark > > & landmarks ()
 
const absl::flat_hash_map< int, std::unique_ptr< RigidBody > > & rigidbodies () const
 Accessor for rigid bodies.
 
absl::flat_hash_map< int, std::unique_ptr< RigidBody > > & rigidbodies ()
 
void EnableGravityEstimation (bool enable)
 Enable flag for gravity estimation.
 
const Eigen::Vector3d & gravity () const
 Accessor for gravity vector.
 
Eigen::Vector3d & gravity ()
 
void SetGravity (const Eigen::Vector3d &gravity)
 Setter for gravity for easy pybind integration.
 
const Eigen::Vector3d & GetGravity () const
 Getter for gravity for easy pybind integration.
 
int NumberOfLandmarks () const
 Get the number of landmarks currently in this world model.
 
int NumberOfRigidBodies () const
 Get the number of rigid bodies currently in this world model.
 
void ClearLandmarks ()
 Remove all Landmark objects from the world model.
 
void ClearRigidBodies ()
 Remove all RigidBody objects from the world model.
 
void Clear ()
 Remove all objects from the world model.
 

Static Public Attributes

static constexpr double kGravityDefaultZ = -9.80665
 

Detailed Description

WorldModel manages all Landmark and RigidBody objects in an optimization problem.

Member Function Documentation

◆ AddLandmark()

absl::Status calico::WorldModel::AddLandmark ( Landmark landmark,
bool  take_ownership = true 
)

Add a Landmark object to the world model. Returns an InvalidArgument status code if the landmark id is not unique.

◆ AddParametersToProblem()

int calico::WorldModel::AddParametersToProblem ( ceres::Problem &  problem)

Add internal parameters to a ceres problem. Any internal parameters set to constant are marked as such in the problem. Returns the total number of parameters added to the problem.

◆ AddRigidBody()

absl::Status calico::WorldModel::AddRigidBody ( RigidBody rigidbody,
bool  take_ownership = true 
)

Add a RigidBody object to the world model. Returns an InvalidArgument status code if the rigid body id is not unique.

Member Data Documentation

◆ kGravityDefaultZ

constexpr double calico::WorldModel::kGravityDefaultZ = -9.80665
staticconstexpr

Default magnitude of gravity vector. Gravity resolved in the standard inertial frame is defined as \(\mathbf{g}^w=\left[0, 0, -9.80665\right]^T\)


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