Skip to content

Commit

Permalink
Fix waypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
nab138 committed Jul 18, 2024
1 parent 5e05aea commit 514f61c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public void setUnsnappedTarget(Vertex unsnappedTarget) {
* @param path The path to add.
*/
public void addPath(Path path) {
this.addAll(path);
this.add(target);
this.addAll(path);
createFullPath();
setUnsnappedTarget(path.getUnsnappedTarget());
this.target = path.getTarget();
Expand Down Expand Up @@ -383,8 +383,8 @@ public ArrayList<Pose2d> asPose2dList() {
*/
public Trajectory asTrajectory(TrajectoryConfig config) throws ImpossiblePathException {
try {
return TrajectoryGenerator.generateTrajectory(asPose2dList(), config);
} catch (TrajectoryGenerationException e){
return TrajectoryGenerator.generateTrajectory(asPose2dList(), config);
} catch (TrajectoryGenerationException e) {
throw new ImpossiblePathException("Failed to generate trajectory for path. Error: " + e.getMessage());
}
}
Expand Down

0 comments on commit 514f61c

Please sign in to comment.