Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Merge OptimalTrajectoryGenerator and SwerveDiscreteOptimal classes
Browse files Browse the repository at this point in the history
The geometry classes now overload operator== to produce equality
constraints.
  • Loading branch information
calcmogul committed Jun 23, 2024
1 parent 1076e26 commit 1138997
Show file tree
Hide file tree
Showing 28 changed files with 682 additions and 832 deletions.
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn main() {
.file("src/trajoptlibrust.cpp")
.include("src")
.include(format!("{}/include", cmake_dest.display()))
.include(format!("{}/include/eigen3", cmake_dest.display()))
.std("c++20");

bridge_build.compile("trajoptrust");
Expand Down
6 changes: 4 additions & 2 deletions examples/Swerve/src/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) TrajoptLib contributors

#include <trajopt/OptimalTrajectoryGenerator.hpp>
#include <trajopt/SwerveTrajectoryGenerator.hpp>

int main() {
trajopt::SwerveDrivetrain swerveDrivetrain{
Expand All @@ -23,7 +23,9 @@ int main() {
path.WptZeroVelocity(1);
path.ControlIntervalCounts({4});

trajopt::SwerveTrajectoryGenerator generator{path};

// SOLVE
[[maybe_unused]]
auto solution = trajopt::OptimalTrajectoryGenerator::Generate(path, true);
auto solution = generator.Generate(true);
}
38 changes: 0 additions & 38 deletions include/trajopt/OptimalTrajectoryGenerator.hpp

This file was deleted.

Loading

0 comments on commit 1138997

Please sign in to comment.