gtsam
Loading...
Searching...
No Matches
LocalOrientedPlane3Factor.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
15
16/*
17 * @file LocalOrientedPlane3Factor.h
18 * @brief LocalOrientedPlane3 Factor class
19 * @author David Wisth
20 * @date February 12, 2021
21 */
22
23#pragma once
24
25#include <gtsam/geometry/OrientedPlane3.h>
28#include <gtsam_unstable/dllexport.h>
29
30#include <string>
31
32namespace gtsam {
33
53class GTSAM_UNSTABLE_EXPORT LocalOrientedPlane3Factor
54 : public NoiseModelFactorT<Vector3, Pose3, Pose3, OrientedPlane3> {
55 protected:
56 OrientedPlane3 measured_p_;
58public:
59
60 // Provide access to the Matrix& version of evaluateError:
62
65
66 ~LocalOrientedPlane3Factor() override {}
67
80 Key poseKey, Key anchorPoseKey, Key landmarkKey)
81 : Base(noiseModel, poseKey, anchorPoseKey, landmarkKey), measured_p_(z) {}
82
85 Key poseKey, Key anchorPoseKey, Key landmarkKey)
86 : Base(noiseModel, poseKey, anchorPoseKey, landmarkKey), measured_p_(z) {}
87
89 void print(const std::string& s = "LocalOrientedPlane3Factor",
90 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
91
92 /***
93 * Vector of errors
94 * @brief Error = measured_plane_.error(a_plane.transform(inv(wTwa) * wTwi))
95 *
96 * This is the error of the measured and predicted plane in the current
97 * sensor frame, i. The plane is represented in the anchor pose, a.
98 *
99 * @param wTwi The pose of the sensor in world coordinates
100 * @param wTwa The pose of the anchor frame in world coordinates
101 * @param a_plane The estimated plane in anchor frame.
102 *
103 * Note: The optimized plane is represented in anchor frame, a, not the
104 * world frame.
105 */
106 Vector3 evaluateError(const Pose3& wTwi, const Pose3& wTwa,
107 const OrientedPlane3& a_plane, OptionalMatrixType H1,
108 OptionalMatrixType H2,
109 OptionalMatrixType H3) const override;
110};
111
112} // namespace gtsam
Base class for noise model factors with N variables.
Non-linear factor base classes.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:43
All noise models live in the noiseModel namespace.
Definition LossFunctions.cpp:33
Represents an infinite plane in 3D, which is composed of a planar normal and its perpendicular distan...
Definition OrientedPlane3.h:39
virtual Vector3 evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
Factor to measure a planar landmark from a given pose, with a given local linearization point.
Definition LocalOrientedPlane3Factor.h:54
LocalOrientedPlane3Factor(const Vector4 &z, const SharedNoiseModel &noiseModel, Key poseKey, Key anchorPoseKey, Key landmarkKey)
Constructor with measured plane (a,b,c,d) coefficients.
Definition LocalOrientedPlane3Factor.h:79
LocalOrientedPlane3Factor()
Constructor.
Definition LocalOrientedPlane3Factor.h:64