BipedalLocomotion::Planners::ConvexHullHelper class

ConvexHullHelper is an helper class that simplifies the building of a convex hull given a set of points that belongs to $\mathbb{R} ^n$ .

The helper computes the vertex enumeration of the convex hull. Then it converts the V-representation of the convex polyhedron in the H-representation, i.e. it performs the convex-hull computation. The class can be used to retrieve the matrices and vectors that describes the Half space representation of the form:

\[ P = \left \{ x= \begin{bmatrix} x_1 & ... & x_d \end{bmatrix} ^ \top : b - A x \ge 0 \right \}. \]

Where $b$ is a m-vector and A is a m x n real matrix.

Constructors, destructors, conversion operators

ConvexHullHelper()
Constructor.
~ConvexHullHelper()
Destructor.

Public functions

auto buildConvexHull(Eigen::Ref<const Eigen::MatrixXd> points) -> bool
Given a set of points in $ \mathbb{R} ^ n$ the function build the convex hull.
auto getA() const -> Eigen::Ref<const Eigen::MatrixXd>
Return the $A$ constraint matrix, such that $ Ax \le b$ iff the point $x$ is in the convex hull.
auto getB() const -> Eigen::Ref<const Eigen::VectorXd>
Return the $b$ constraint vector, such that $ Ax \le b$ iff the point $x$ is in the convex hull.
auto doesPointBelongToConvexHull(Eigen::Ref<const Eigen::VectorXd> point) const -> bool
Check if a point belong to the convex hull (The frontier of the set is also included).

Function documentation

bool BipedalLocomotion::Planners::ConvexHullHelper::buildConvexHull(Eigen::Ref<const Eigen::MatrixXd> points)

Given a set of points in $ \mathbb{R} ^ n$ the function build the convex hull.

Parameters
points a matrix of the points that describes the convex hull. Each point is stored as column of the matrix.
Returns true/false in case of success/failure.

Eigen::Ref<const Eigen::MatrixXd> BipedalLocomotion::Planners::ConvexHullHelper::getA() const

Return the $A$ constraint matrix, such that $ Ax \le b$ iff the point $x$ is in the convex hull.

Returns the constraint matrix.

Eigen::Ref<const Eigen::VectorXd> BipedalLocomotion::Planners::ConvexHullHelper::getB() const

Return the $b$ constraint vector, such that $ Ax \le b$ iff the point $x$ is in the convex hull.

Returns the constraint vector.

bool BipedalLocomotion::Planners::ConvexHullHelper::doesPointBelongToConvexHull(Eigen::Ref<const Eigen::VectorXd> point) const

Check if a point belong to the convex hull (The frontier of the set is also included).

Returns true if the point belongs to the convex hull false otherwise.