|
NASA Astrobee Robot Software
0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
|
Go to the documentation of this file.
19 #ifndef LOCALIZATION_MEASUREMENTS_PLANE_H_
20 #define LOCALIZATION_MEASUREMENTS_PLANE_H_
22 #include <gtsam/base/Testable.h>
23 #include <gtsam/base/Vector.h>
24 #include <gtsam/geometry/Point3.h>
33 const gtsam::Point3&
point()
const {
return point_; }
34 const gtsam::Vector3&
normal()
const {
return normal_; }
38 gtsam::Vector3 normal_;
45 normal_ = point_normal_plane.
normal();
49 d_ = -1.0 * normal_.dot(point_normal_plane.
point());
52 const gtsam::Vector3&
normal()
const {
return normal_; }
53 const double&
d()
const {
return d_; }
57 gtsam::Vector3 normal_;
67 const double norm = general_plane.
normal().norm();
68 unit_normal_ = general_plane.
normal() / norm;
69 constant_ = general_plane.
d() / norm;
71 const gtsam::Vector3&
unit_normal()
const {
return unit_normal_; }
72 const double&
constant()
const {
return constant_; }
77 template <
class ARCHIVE>
78 void serialize(ARCHIVE& ar,
const unsigned int ) {
79 ar& BOOST_SERIALIZATION_NVP(unit_normal_);
80 ar& BOOST_SERIALIZATION_NVP(constant_);
83 gtsam::Vector3 unit_normal_;
94 double Distance(
const gtsam::Point3& point, gtsam::OptionalJacobian<1, 3> d_distance_d_point = boost::none)
const {
96 if (d_distance_d_point) {
101 void print(
const std::string& s =
"")
const {
102 std::cout << (s.empty() ? s : s +
" ") <<
unit_normal() <<
", " <<
constant() << std::endl;
112 template <
class ARCHIVE>
113 void serialize(ARCHIVE& ar,
const unsigned int ) {
114 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
125 #endif // LOCALIZATION_MEASUREMENTS_PLANE_H_
const double & constant() const
Definition: plane.h:72
friend class boost::serialization::access
Definition: plane.h:111
const double & d() const
Definition: plane.h:53
const gtsam::Vector3 & unit_normal() const
Definition: plane.h:71
GeneralPlane(const PointNormalPlane &point_normal_plane)
Definition: plane.h:44
Plane(const PointNormalPlane &point_normal_plane)
Definition: plane.h:92
const gtsam::Vector3 & normal() const
Definition: plane.h:52
bool equals(const Plane &plane, double tol=1e-9) const
Definition: plane.h:104
const gtsam::Point3 & point() const
Definition: plane.h:33
Definition: depth_correspondences.h:25
Definition: cumulative_factor.h:26
Plane(const gtsam::Point3 &point, const gtsam::Vector3 &normal)
Definition: plane.h:93
double Distance(const gtsam::Point3 &point, gtsam::OptionalJacobian< 1, 3 > d_distance_d_point=boost::none) const
Definition: plane.h:94
HessianNormalPlane()=default
HessianNormalPlane(const GeneralPlane &general_plane)
Definition: plane.h:66
void print(const std::string &s="") const
Definition: plane.h:101
friend class boost::serialization::access
Definition: plane.h:76
PointNormalPlane(const gtsam::Point3 &point, const gtsam::Vector3 &normal)
Definition: plane.h:32
const gtsam::Vector3 & normal() const
Definition: plane.h:34