Go to the documentation of this file.
15 #ifndef BELUGA_SENSOR_DATA_NDT_CELL_HPP
16 #define BELUGA_SENSOR_DATA_NDT_CELL_HPP
19 #include <type_traits>
23 #include <range/v3/view/zip.hpp>
35 template <
int NDim,
typename Scalar =
double>
37 static_assert(std::is_floating_point_v<Scalar>,
"Scalar template parameter should be a floating point.");
52 std::exp((-d2 / 2.0) * error.transpose() * (measurement.
covariance +
covariance).inverse() * error);
58 os <<
"Mean \n" << cell.
mean.transpose() <<
" \n\nCovariance: \n" << cell.
covariance;
64 static_assert(
num_dim == 2,
"Cannot transform a non 2D NDT Cell with a SE2 transform.");
65 const Eigen::Vector2d uij = tf * ndt_cell.
mean;
66 const Eigen::Matrix2Xd cov = tf.
so2().matrix() * ndt_cell.
covariance * tf.
so2().matrix().transpose();
72 static_assert(
num_dim == 3,
"Cannot transform a non 3D NDT Cell with a SE3 transform.");
73 const Eigen::Vector3d uij = tf * ndt_cell.
mean;
74 const Eigen::Matrix3Xd cov = tf.
so3().matrix() * ndt_cell.
covariance * tf.
so3().matrix().transpose();
SOPHUS_FUNC SO3Member & so3()
Representation for a cell of a N dimensional NDT cell.
SOPHUS_FUNC SO2Member & so2()
Eigen::Vector< Scalar, NDim > mean
Mean of the N dimensional normal distribution.
Eigen::Matrix< Scalar, NDim, NDim > covariance
Covariance of the N dimensional normal distribution.
double likelihood_at(const NDTCell &measurement, double d1=1.0, double d2=1.0) const
friend NDTCell operator*(const Sophus::SE2< scalar_type > &tf, const NDTCell &ndt_cell)
Transform the normal distribution according to tf, both mean and covariance.
Eigen::Matrix< Scalar, Dims, 1 > Vector
Type alias for single-column matrices, available starting Eigen 3.4.
static constexpr int num_dim
Number of dimensions of the cell's translation.
Scalar scalar_type
Floating point scalar type.
friend std::ostream & operator<<(std::ostream &os, const NDTCell &cell)
Ostream overload mostly for debugging purposes.
The main Beluga namespace.
friend NDTCell operator*(const Sophus::SE3< scalar_type > &tf, const NDTCell &ndt_cell)
Transform the normal distribution according to tf, both mean and covariance.
beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:53