All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ProlateHyperspheroid.cpp
84 ompl::ProlateHyperspheroid::ProlateHyperspheroid(unsigned int n, const double focus1[], const double focus2[])
133 throw Exception("The transformation is not up to date in the PHS class. Has the transverse diameter been set?");
137 Eigen::Map<Eigen::VectorXd>(phs, dataPtr_->dim_) = dataPtr_->transformationWorldFromEllipse_*Eigen::Map<const Eigen::VectorXd>(sphere, dataPtr_->dim_);
173 // The transform is not up to date until the transverse diameter has been set, therefore we have no transverse diameter and we have infinite measure
195 return (dataPtr_->xFocus1_ - Eigen::Map<const Eigen::VectorXd>(point, dataPtr_->dim_)).norm() + (Eigen::Map<const Eigen::VectorXd>(point, dataPtr_->dim_) - dataPtr_->xFocus2_).norm();
228 // Formulate as a Wahba problem, first forming the matrix a_j*a_i' where a_j is the transverse axis if the ellipse in the world frame, and a_i is the first basis vector of the world frame (i.e., [1 0 .... 0])
229 wahbaProb = transverseAxis * Eigen::MatrixXd::Identity(dataPtr_->dim_, dataPtr_->dim_).col(0).transpose();
232 Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::NoQRPreconditioner> svd(wahbaProb, Eigen::ComputeFullV | Eigen::ComputeFullU);
241 dataPtr_->rotationWorldFromEllipse_ = svd.matrixU() * middleM.asDiagonal() * svd.matrixV().transpose();
254 conjugateDiamater = std::sqrt(dataPtr_->transverseDiameter_*dataPtr_->transverseDiameter_ - dataPtr_->minTransverseDiameter_*dataPtr_->minTransverseDiameter_);
264 dataPtr_->transformationWorldFromEllipse_ = dataPtr_->rotationWorldFromEllipse_ * diagAsVector.asDiagonal();
267 dataPtr_->phsMeasure_ = prolateHyperspheroidMeasure(dataPtr_->dim_, dataPtr_->minTransverseDiameter_, dataPtr_->transverseDiameter_);
void setTransverseDiameter(double transverseDiameter)
Set the transverse diameter of the PHS.
Definition: ProlateHyperspheroid.cpp:106
unsigned int getPhsDimension(void) const
The dimension of the PHS.
Definition: ProlateHyperspheroid.cpp:163
double prolateHyperspheroidMeasure(unsigned int N, double dFoci, double dTransverse)
The Lebesgue measure (i.e., "volume") of an n-dimensional prolate hyperspheroid (a symmetric hyperell...
Definition: GeometricEquations.cpp:60
void transform(const double sphere[], double phs[]) const
Transform a point from a sphere to PHS. The return variable phs is expected to already exist...
Definition: ProlateHyperspheroid.cpp:129
bool isInPhs(const double point[]) const
Check if the given point lies in the PHS.
Definition: ProlateHyperspheroid.cpp:141
ProlateHyperspheroid(unsigned int n, const double focus1[], const double focus2[])
The description of an n-dimensional prolate hyperspheroid.
Definition: ProlateHyperspheroid.cpp:84
double getMinTransverseDiameter(void) const
The minimum transverse diameter of the PHS, i.e., the distance between the foci.
Definition: ProlateHyperspheroid.cpp:188
bool isOnPhs(const double point[]) const
Check if the given point lies on the PHS.
Definition: ProlateHyperspheroid.cpp:152
double getPathLength(const double point[]) const
Calculate length of a line that originates from one focus, passes through the given point...
Definition: ProlateHyperspheroid.cpp:193
unsigned int getDimension() const
The state dimension of the PHS.
Definition: ProlateHyperspheroid.cpp:198