Class AbsoluteOrientation3DStampedEulerConstraint

Inheritance Relationships

Base Type

  • public fuse_core::Constraint

Class Documentation

class AbsoluteOrientation3DStampedEulerConstraint : public fuse_core::Constraint

A constraint that represents either prior information about a 3D orientation, or a direct measurement of the 3D orientation as roll-pitch-yaw Euler angles.

This constraint holds the measured 3D orientation and the measurement uncertainty/covariance. The orientation is represented as Euler angles, and the covariance represents the error around each rotational axis. This constraint also permits measurement of a subset of the Euler angles given in the variable.

Public Types

using Euler = fuse_variables::Orientation3DStamped::Euler

Public Functions

AbsoluteOrientation3DStampedEulerConstraint() = default

Default constructor.

AbsoluteOrientation3DStampedEulerConstraint(const std::string &source, const fuse_variables::Orientation3DStamped &orientation, const fuse_core::VectorXd &mean, const fuse_core::MatrixXd &covariance, const std::vector<Euler> &axes)

Create a constraint using a measurement/prior of a 3D orientation.

Parameters:
  • source[in] The name of the sensor or motion model that generated this constraint

  • orientation[in] The variable representing the orientation components of the pose

  • mean[in] The measured/prior Euler orientations in the order specified in /p axes

  • covariance[in] The measurement/prior covariance

  • axes[in] Used to specify which of the Euler axes they want to include in the constraint, e.g. “{ Euler::ROLL, EULER::YAW }”

virtual ~AbsoluteOrientation3DStampedEulerConstraint() = default

Destructor.

inline const std::vector<Euler> axes() const

Read-only access to the vector that dictates the order of the Euler axes in the mean, covariance, and sqrtInformation.

inline const fuse_core::VectorXd &mean() const

Read-only access to the measured/prior vector of mean values.

Order is defined by the provided axes parameter. This mean() function deviates from all other currently implemented constraints in that the order does not match the order defined in the variable.

inline const fuse_core::MatrixXd &sqrtInformation() const

Read-only access to the square root information matrix.

Order is defined by the provided axes parameter. This sqrtInformation() function deviates from all other currently implemented constraints in that the order does not match the order defined in the variable.

fuse_core::MatrixXd covariance() const

Compute the measurement covariance matrix.

Order is defined by the provided axes parameter. This covariance() function deviates from all other currently implemented constraints in that the order does not match the order defined in the variable.

void print(std::ostream &stream = std::cout) const override

Print a human-readable description of the constraint to the provided stream.

Parameters:

stream[out] The stream to write to. Defaults to stdout.

ceres::CostFunction *costFunction() const override

Construct an instance of this constraint’s cost function.

The function caller will own the new cost function instance. It is the responsibility of the caller to delete the cost function object when it is no longer needed. If the pointer is provided to a Ceres::Problem object, the Ceres::Problem object will takes ownership of the pointer and delete it during destruction.

Returns:

A base pointer to an instance of a derived CostFunction.

Protected Attributes

fuse_core::VectorXd mean_

The measured/prior mean vector for this variable.

fuse_core::MatrixXd sqrt_information_

The square root information matrix.

std::vector<Euler> axes_

Which Euler angle axes we want to measure.

Friends

friend class boost::serialization::access