EdgesBetweenSubgraphs are defined as the connecting edges between two given subgraphs.
These edges are a subset of the many other edges in the larger graph. From an API standpoint, EdgesBetweenSubgraphs enable transitions between Subgraphs, which can enable transitions between modes. Further, it allows different constraints to be added in the transition between subgraphs. Note that the EdgesBetweenSubgraphs can't be separated from the actual edges in the GraphOfConvexSets framework, thus mixing it with other instances of GCSTrajetoryOptimization is not supported.
#include <drake/planning/trajectory_optimization/gcs_trajectory_optimization.h>
Public Member Functions | |
~EdgesBetweenSubgraphs () | |
void | AddVelocityBounds (const Eigen::Ref< const Eigen::VectorXd > &lb, const Eigen::Ref< const Eigen::VectorXd > &ub) |
Adds a linear velocity constraint to the control point connecting the subgraphs lb ≤ q̇(t) ≤ ub . More... | |
void | AddZeroDerivativeConstraints (int derivative_order) |
Enforces zero derivatives on the control point connecting the subgraphs. More... | |
void | AddPathContinuityConstraints (int continuity_order) |
Enforces derivative continuity constraints on the edges between the subgraphs. More... | |
Does not allow copy, move, or assignment | |
EdgesBetweenSubgraphs (const EdgesBetweenSubgraphs &)=delete | |
EdgesBetweenSubgraphs & | operator= (const EdgesBetweenSubgraphs &)=delete |
EdgesBetweenSubgraphs (EdgesBetweenSubgraphs &&)=delete | |
EdgesBetweenSubgraphs & | operator= (EdgesBetweenSubgraphs &&)=delete |
Friends | |
class | GcsTrajectoryOptimization |
|
delete |
|
delete |
void AddPathContinuityConstraints | ( | int | continuity_order | ) |
Enforces derivative continuity constraints on the edges between the subgraphs.
continuity_order | is the order of the continuity constraint. |
Note that the constraints are on the control points of the derivatives of r(s) and not q(t). This may result in discontinuities of the trajectory return by SolvePath()
since the r(s) will get rescaled by the duration h to yield q(t). NormalizeSegmentTimes()
will return r(s) with valid continuity.
std::exception | if the continuity order is not equal or less than the order of both subgraphs. |
std::exception | if the continuity order is less than one since path continuity is enforced by default. |
void AddVelocityBounds | ( | const Eigen::Ref< const Eigen::VectorXd > & | lb, |
const Eigen::Ref< const Eigen::VectorXd > & | ub | ||
) |
Adds a linear velocity constraint to the control point connecting the subgraphs lb
≤ q̇(t) ≤ ub
.
lb | is the lower bound of the velocity. |
ub | is the upper bound of the velocity. |
std::exception | if both subgraphs order is zero, since the velocity is defined as the derivative of the Bézier curve. At least one of the subgraphs must have an order of at least 1. |
std::exception | if lb or ub are not of size num_positions(). |
void AddZeroDerivativeConstraints | ( | int | derivative_order | ) |
Enforces zero derivatives on the control point connecting the subgraphs.
For velocity, acceleration, jerk, etc. enforcing zero-derivative on the trajectory q(t) is equivalent to enforcing zero-derivative on the trajectory r(s). Hence this constraint is convex.
derivative_order | is the order of the derivative to be constrained. |
std::exception | if the derivative order < 1. |
std::exception | if both subgraphs order is less than the desired derivative order. |
|
delete |
|
delete |
|
friend |