If the user manually specifies the edges between regions and provides an index which is out-of-range, GcsTrajectoryOptimization segfaults. This PR adds a test that reveals the problem, and switches to indexing with .at(...) to prevent the segmentation fault.
If the user manually specifies the edges between regions and provides an index which is out-of-range, GcsTrajectoryOptimization segfaults. This PR adds a test that reveals the problem, and switches to indexing with
.at(...)
to prevent the segmentation fault.This change is![Reviewable](https://reviewable.io/review_button.svg)