ov_type::Type class

Base class for estimated variables.

This class is used how variables are represented or updated (e.g., vectors or quaternions). Each variable is defined by its error state size and its location in the covariance matrix. We additionally require all sub-types to have a update procedure.

Derived classes

class IMU
Derived Type class that implements an IMU state.
class JPLQuat
Derived Type class that implements JPL quaternion.
class PoseJPL
Derived Type class that implements a 6 d.o.f pose.
class Vec
Derived Type class that implements vector variables.

Constructors, destructors, conversion operators

Type(int size_)
Default constructor for our Type.

Public functions

void set_local_id(int new_id) virtual
Sets id used to track location of variable in the filter covariance.
auto id() -> int
Access to variable id (i.e. its location in the covariance)
auto size() -> int
Access to variable size (i.e. its error state size)
void update(const Eigen::VectorXd& dx) pure virtual
Update variable due to perturbation of error state.
auto value() const -> const Eigen::MatrixXd& virtual
Access variable's estimate.
auto fej() const -> const Eigen::MatrixXd& virtual
Access variable's first-estimate.
void set_value(const Eigen::MatrixXd& new_value) virtual
Overwrite value of state's estimate.
void set_fej(const Eigen::MatrixXd& new_value) virtual
Overwrite value of first-estimate.
auto clone() -> std::shared_ptr<Type> pure virtual
Create a clone of this variable.
auto check_if_subvariable(const std::shared_ptr<Type> check) -> std::shared_ptr<Type> virtual
Determine if pass variable is a sub-variable.

Protected variables

Eigen::MatrixXd _fej
First-estimate.
Eigen::MatrixXd _value
Current best estimate.
int _id
Location of error state in covariance.
int _size
Dimension of error state.

Function documentation

ov_type::Type::Type(int size_)

Default constructor for our Type.

Parameters
size_ degrees of freedom of variable (i.e., the size of the error state)

void ov_type::Type::set_local_id(int new_id) virtual

Sets id used to track location of variable in the filter covariance.

Parameters
new_id entry in filter covariance corresponding to this variable

Note that the minimum ID is -1 which says that the state is not in our covariance. If the ID is larger than -1 then this is the index location in the covariance matrix.

void ov_type::Type::update(const Eigen::VectorXd& dx) pure virtual

Update variable due to perturbation of error state.

Parameters
dx Perturbation used to update the variable through a defined "boxplus" operation

void ov_type::Type::set_value(const Eigen::MatrixXd& new_value) virtual

Overwrite value of state's estimate.

Parameters
new_value New value that will overwrite state's value

void ov_type::Type::set_fej(const Eigen::MatrixXd& new_value) virtual

Overwrite value of first-estimate.

Parameters
new_value New value that will overwrite state's fej

std::shared_ptr<Type> ov_type::Type::check_if_subvariable(const std::shared_ptr<Type> check) virtual

Determine if pass variable is a sub-variable.

Parameters
check Type pointer to compare our subvariables to

If the passed variable is a sub-variable or the current variable this will return it. Otherwise it will return a nullptr, meaning that it was unable to be found.