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.
|
| | ~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.
|
| void | AddNonlinearDerivativeBounds (const Eigen::Ref< const Eigen::VectorXd > &lb, const Eigen::Ref< const Eigen::VectorXd > &ub, int derivative_order) |
| | Adds a nonlinear derivative constraints to the control point connecting the subgraphs lb ≤ dᴺq(t) / dtᴺ ≤ ub.
|
| void | AddZeroDerivativeConstraints (int derivative_order) |
| | Enforces zero derivatives on the control point connecting the subgraphs.
|
| void | AddPathContinuityConstraints (int continuity_order) |
| | Enforces that for any two subsequent path segments that are joined by an edge in this EdgesBetweenSubgraphs, the continuity_orderth path derivative at the end of the first segment equals that of the start of the second segment.
|
| void | AddContinuityConstraints (int continuity_order) |
| | Enforces that for any two subsequent path segments that are joined by an edge in this EdgesBetweenSubgraphs, the continuity_orderth time derivative at the end of the first segment equals that of the start of the second segment.
|
| const std::vector< geometry::optimization::GraphOfConvexSets::Edge * > & | Edges () |
| | Returns constant reference to a vector of mutable pointers to the edges.
|
| std::vector< const geometry::optimization::GraphOfConvexSets::Edge * > | Edges () const |
| | Returns pointers to the edges.
|
| const std::pair< symbolic::Variable, symbolic::Variable > & | edge_constituent_vertex_durations () const |
| | Returns a pair of placeholder decision variables (not actually declared as decision variables in the MathematicalProgram) associated with the time scaling of the trajectory in two sets that are connected by an edge from this EdgesBetweenSubgraphs.
|
| const std::pair< solvers::MatrixXDecisionVariable, solvers::MatrixXDecisionVariable > & | edge_constituent_vertex_control_points () const |
| | Returns a pair of placeholder decision variables (not actually declared as decision variables in the MathematicalProgram) associated with the control points of the trajectory in two sets that are connected by an edge from this EdgesBetweenSubgraphs.
|
| void | AddEdgeCost (const symbolic::Expression &e, const std::unordered_set< geometry::optimization::GraphOfConvexSets::Transcription > &use_in_transcription={ geometry::optimization::GraphOfConvexSets::Transcription::kMIP, geometry::optimization::GraphOfConvexSets::Transcription::kRelaxation, geometry::optimization::GraphOfConvexSets::Transcription::kRestriction}) |
| | Adds an arbitrary user-defined cost to every edge within the EdgesBetweenSubgraphs.
|
| void | AddEdgeCost (const solvers::Binding< solvers::Cost > &binding, const std::unordered_set< geometry::optimization::GraphOfConvexSets::Transcription > &use_in_transcription={ geometry::optimization::GraphOfConvexSets::Transcription::kMIP, geometry::optimization::GraphOfConvexSets::Transcription::kRelaxation, geometry::optimization::GraphOfConvexSets::Transcription::kRestriction}) |
| | Convenience overload of AddEdgeCost to take in a Binding<Cost>.
|
| void | AddEdgeConstraint (const symbolic::Formula &e, const std::unordered_set< geometry::optimization::GraphOfConvexSets::Transcription > &use_in_transcription={ geometry::optimization::GraphOfConvexSets::Transcription::kMIP, geometry::optimization::GraphOfConvexSets::Transcription::kRelaxation, geometry::optimization::GraphOfConvexSets::Transcription::kRestriction}) |
| | Adds an arbitrary user-defined constraint to every edge within the EdgesBetweenSubgraphs.
|
| void | AddEdgeConstraint (const solvers::Binding< solvers::Constraint > &binding, const std::unordered_set< geometry::optimization::GraphOfConvexSets::Transcription > &use_in_transcription={ geometry::optimization::GraphOfConvexSets::Transcription::kMIP, geometry::optimization::GraphOfConvexSets::Transcription::kRelaxation, geometry::optimization::GraphOfConvexSets::Transcription::kRestriction}) |
| | Convenience overload of AddEdgeConstraint to take in a Binding<Constraint>.
|
| | EdgesBetweenSubgraphs (const EdgesBetweenSubgraphs &)=delete |
| EdgesBetweenSubgraphs & | operator= (const EdgesBetweenSubgraphs &)=delete |
| | EdgesBetweenSubgraphs (EdgesBetweenSubgraphs &&)=delete |
| EdgesBetweenSubgraphs & | operator= (EdgesBetweenSubgraphs &&)=delete |
| void AddContinuityConstraints |
( |
int | continuity_order | ) |
|
Enforces that for any two subsequent path segments that are joined by an edge in this EdgesBetweenSubgraphs, the continuity_orderth time derivative at the end of the first segment equals that of the start of the second segment.
This adds a nonlinear constraint to the restriction and MIP GraphOfConvexSets::Transcription, while adding a convex surrogate to the relaxation. For more details, see Guiding Non-convex Optimization with the GraphOfConvexSets.
The continuity is enforced on the control points of q(t), which appear as nonlinear constraints.
(dᴺrᵤ(s=1) / dsᴺ) / hᵤᴺ == (dᴺrᵥ(s=0) / dsᴺ) / hᵥᴺ
The convex surrogate is simply the path continuity, where hᵤᴺ and hᵥᴺ are replaced by the characteristic times of the respective sets:
(dᴺrᵤ(s=1) / dsᴺ) / hᵤ₀ᴺ == (dᴺrᵥ(s=0) / dsᴺ) / hᵥ₀ᴺ
. For now, these are set to one, but future work may involve scaling them by the size of the sets.
- Parameters
-
| continuity_order | is the order of the continuity constraint. |
- Exceptions
-
| 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. |
- Note
- To enforce that the trajectory is of class C^k, you must call AddContinuityConstraint for each continuity_order 1 through k.
| void AddNonlinearDerivativeBounds |
( |
const Eigen::Ref< const Eigen::VectorXd > & | lb, |
|
|
const Eigen::Ref< const Eigen::VectorXd > & | ub, |
|
|
int | derivative_order ) |
Adds a nonlinear derivative constraints to the control point connecting the subgraphs lb ≤ dᴺq(t) / dtᴺ ≤ ub.
This adds a nonlinear constraint to the restriction and MIP GraphOfConvexSets::Transcription, while adding a convex surrogate to the relaxation. For more details, see Guiding Non-convex Optimization with the GraphOfConvexSets.
The nonlinear constraint involves the derivative dᴺq(t) / dtᴺ which is decomposed as dᴺr(s) / dsᴺ / hᴺ. The convex surrogate replaces the nonlinear component hᴺ with h₀ᴺ⁻¹h, where h₀ is the characteristic time of the set. For now, h₀ is set to 1.0 for all sets.
- Parameters
-
| lb | is the lower bound of the derivative. |
| ub | is the upper bound of the derivative. |
| derivative_order | is the order of the derivative to be constrained. |
- Exceptions
-
| std::exception | if both subgraphs order is less than the desired derivative order. |
| std::exception | if the derivative order <= 1, since the linear velocity bounds are preferred. |
| std::exception | if lb or ub are not of size num_positions(). |