Class RelativePose3DStampedConstraint

Inheritance Relationships

Base Type

  • public fuse_core::Constraint

Class Documentation

class RelativePose3DStampedConstraint : public fuse_core::Constraint

A constraint that represents a measurement on the difference between two 3D poses.

This type of constraint arises in many situations. Many types of incremental odometry measurements (e.g., visual odometry) measure the change in the pose, not the pose directly. This constraint holds the measured 3D pose change and the measurement uncertainty/covariance.

Public Functions

RelativePose3DStampedConstraint() = default

Default constructor.

RelativePose3DStampedConstraint(const std::string &source, const fuse_variables::Position3DStamped &position1, const fuse_variables::Orientation3DStamped &orientation1, const fuse_variables::Position3DStamped &position2, const fuse_variables::Orientation3DStamped &orientation2, const fuse_core::Vector7d &delta, const fuse_core::Matrix6d &covariance)

Constructor.

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

  • position1[in] The variable representing the position components of the first pose

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

  • position2[in] The variable representing the position components of the second pose

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

  • delta[in] The measured change in the pose (7x1 vector: dx, dy, dz, dqw, dqx, dqy, dqz)

  • covariance[in] The measurement covariance (6x6 matrix: dx, dy, dz, dqx, dqy, dqz)

virtual ~RelativePose3DStampedConstraint() = default

Destructor.

inline const fuse_core::Vector7d &delta() const

Read-only access to the measured pose change.

inline const fuse_core::Matrix6d &sqrtInformation() const

Read-only access to the square root information matrix.

inline fuse_core::Matrix6d covariance() const

Compute the measurement covariance matrix.

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

Access the cost function for this constraint.

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::Vector7d delta_

The measured pose change (dx, dy, dz, dqw, dqx, dqy, dqz)

fuse_core::Matrix6d sqrt_information_

The square root information matrix (derived from the covariance matrix)

Friends

friend class boost::serialization::access