BipedalLocomotion::Math::QuadraticBezierCurve class

QuadraticBezierCurve implements a quadratic Bézier curve.

A quadratic Bézier curve is characterized by a group of control points P0 to P2. The initial and final control points consistently represent the endpoints of the curve, while the intermediate control point typically do not lie precisely on the curve. In the subsequent sections, the sums should be interpreted as affine combinations, meaning that the coefficients add up to 1. In detail QuadraticBezierCurve implements

\[ x(t) = (1 - t)^2 P_0 + 2(1 - t)t P_1 + t^2 P_2 \]

where $P_0$ $P_2$ are the initial and final point of the curve, while $P_1$ is the control point.

Public functions

auto initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) -> bool
Initialize the QuadraticBezierCurve.
auto evaluateCurve(Eigen::Ref<const Eigen::Vector2d> initialPoint, Eigen::Ref<const Eigen::Vector2d> controlPoint, Eigen::Ref<const Eigen::Vector2d> finalPoint) -> Eigen::Ref<const Eigen::Matrix2Xd>
Evaluate the curve given in initial, control and final points.

Function documentation

bool BipedalLocomotion::Math::QuadraticBezierCurve::initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler)

Initialize the QuadraticBezierCurve.

Parameters
handler pointer to the parameter handler.
Returns true in case of success/false otherwise.

Eigen::Ref<const Eigen::Matrix2Xd> BipedalLocomotion::Math::QuadraticBezierCurve::evaluateCurve(Eigen::Ref<const Eigen::Vector2d> initialPoint, Eigen::Ref<const Eigen::Vector2d> controlPoint, Eigen::Ref<const Eigen::Vector2d> finalPoint)

Evaluate the curve given in initial, control and final points.

Parameters
initialPoint initial point of the curve.
controlPoint control point of the curve.
finalPoint final point of the curve.
Returns a matrix containing the curve.