LocalOrientedPlane3Factor.h
Go to the documentation of this file.
1 /*
2  * @file LocalOrientedPlane3Factor.h
3  * @brief LocalOrientedPlane3 Factor class
4  * @author David Wisth
5  * @date February 12, 2021
6  */
7 
8 #pragma once
9 
12 #include <gtsam_unstable/dllexport.h>
13 
14 #include <string>
15 
16 namespace gtsam {
17 
37 class GTSAM_UNSTABLE_EXPORT LocalOrientedPlane3Factor
38  : public NoiseModelFactorN<Pose3, Pose3, OrientedPlane3> {
39  protected:
42 public:
43 
44  // Provide access to the Matrix& version of evaluateError:
45  using Base::evaluateError;
46 
49 
51 
63  LocalOrientedPlane3Factor(const Vector4& z, const SharedNoiseModel& noiseModel,
64  Key poseKey, Key anchorPoseKey, Key landmarkKey)
65  : Base(noiseModel, poseKey, anchorPoseKey, landmarkKey), measured_p_(z) {}
66 
68  const SharedNoiseModel& noiseModel,
69  Key poseKey, Key anchorPoseKey, Key landmarkKey)
70  : Base(noiseModel, poseKey, anchorPoseKey, landmarkKey), measured_p_(z) {}
71 
73  void print(const std::string& s = "LocalOrientedPlane3Factor",
74  const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
75 
76  /***
77  * Vector of errors
78  * @brief Error = measured_plane_.error(a_plane.transform(inv(wTwa) * wTwi))
79  *
80  * This is the error of the measured and predicted plane in the current
81  * sensor frame, i. The plane is represented in the anchor pose, a.
82  *
83  * @param wTwi The pose of the sensor in world coordinates
84  * @param wTwa The pose of the anchor frame in world coordinates
85  * @param a_plane The estimated plane in anchor frame.
86  *
87  * Note: The optimized plane is represented in anchor frame, a, not the
88  * world frame.
89  */
90  Vector evaluateError(const Pose3& wTwi, const Pose3& wTwa,
91  const OrientedPlane3& a_plane, OptionalMatrixType H1,
92  OptionalMatrixType H2, OptionalMatrixType H3) const override;
93 };
94 
95 } // namespace gtsam
96 
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
const gtsam::Key poseKey
LocalOrientedPlane3Factor(const Vector4 &z, const SharedNoiseModel &noiseModel, Key poseKey, Key anchorPoseKey, Key landmarkKey)
static const KeyFormatter DefaultKeyFormatter
Definition: Key.h:43
Represents an infinite plane in 3D, which is composed of a planar normal and its perpendicular distan...
Matrix * OptionalMatrixType
Eigen::VectorXd Vector
Definition: Vector.h:38
LocalOrientedPlane3Factor(const OrientedPlane3 &z, const SharedNoiseModel &noiseModel, Key poseKey, Key anchorPoseKey, Key landmarkKey)
RealScalar s
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
traits
Definition: chartTesting.h:28
Non-linear factor base classes.
NoiseModelFactorN< Pose3, Pose3, OrientedPlane3 > Base
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:741


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:34