27 CLandmark::~CLandmark() =
default;
34 pose.
mean.
x(pose_mean.x);
35 pose.
mean.
y(pose_mean.y);
36 pose.
mean.z(pose_mean.z);
38 pose.
cov(0, 0) = pose_cov_11;
39 pose.
cov(1, 1) = pose_cov_22;
40 pose.
cov(2, 2) = pose_cov_33;
42 pose.
cov(0, 1) = pose.
cov(1, 0) = pose_cov_12;
43 pose.
cov(0, 2) = pose.
cov(2, 0) = pose_cov_13;
45 pose.
cov(1, 2) = pose.
cov(2, 1) = pose_cov_23;
53 pose_mean.x = pose.
mean.
x();
54 pose_mean.y = pose.
mean.
y();
55 pose_mean.z = pose.
mean.z();
57 pose_cov_11 =
d2f(pose.
cov(0, 0));
58 pose_cov_22 =
d2f(pose.
cov(1, 1));
59 pose_cov_33 =
d2f(pose.
cov(2, 2));
60 pose_cov_12 =
d2f(pose.
cov(0, 1));
61 pose_cov_13 =
d2f(pose.
cov(0, 2));
62 pose_cov_23 =
d2f(pose.
cov(1, 2));
65 uint8_t CLandmark::serializeGetVersion()
const {
return 4; }
68 out << features << pose_mean << normal << pose_cov_11 << pose_cov_22
69 << pose_cov_33 << pose_cov_12 << pose_cov_13 << pose_cov_23 << ID
70 << timestampLastSeen << seenTimesCount;
73 void CLandmark::serializeFrom(
83 "Importing from this old version is not implemented");
87 in >> features >> pose_mean >> normal >> pose_cov_11 >>
88 pose_cov_22 >> pose_cov_33 >> pose_cov_12 >> pose_cov_13 >>
89 pose_cov_23 >> ID >> timestampLastSeen >> seenTimesCount;
#define THROW_EXCEPTION(msg)
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
CPoint3D mean
The mean value.
int64_t TLandmarkID
The type for the IDs of landmarks.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
float d2f(const double d)
shortcut for static_cast<float>(double)
mrpt::math::CMatrixDouble33 cov
The 3x3 covariance matrix.
This namespace contains representation of robot actions and observations.
double x() const
Common members of all points & poses classes.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out
A gaussian distribution for 3D points.