diff --git a/build.rs b/build.rs index ef056fc8..46097adf 100644 --- a/build.rs +++ b/build.rs @@ -48,7 +48,7 @@ fn main() { println!("cargo:rustc-link-lib=fmt"); } - println!("cargo:rerun-if-changed=src/trajoptlibrust.h"); + println!("cargo:rerun-if-changed=src/trajoptlibrust.hpp"); println!("cargo:rerun-if-changed=src/trajoptlibrust.cpp"); println!("cargo:rerun-if-changed=src/lib.rs"); } diff --git a/examples/Swerve/src/Main.cpp b/examples/Swerve/src/Main.cpp index 78d07f57..483d7e87 100644 --- a/examples/Swerve/src/Main.cpp +++ b/examples/Swerve/src/Main.cpp @@ -5,18 +5,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include int main() { using namespace trajopt; diff --git a/include/trajopt/OptimalTrajectoryGenerator.h b/include/trajopt/OptimalTrajectoryGenerator.hpp similarity index 87% rename from include/trajopt/OptimalTrajectoryGenerator.h rename to include/trajopt/OptimalTrajectoryGenerator.hpp index 62586954..9e9b81f8 100644 --- a/include/trajopt/OptimalTrajectoryGenerator.h +++ b/include/trajopt/OptimalTrajectoryGenerator.hpp @@ -6,10 +6,10 @@ #include -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" #include "trajopt/expected" -#include "trajopt/path/SwervePathBuilder.h" -#include "trajopt/solution/SwerveSolution.h" +#include "trajopt/path/SwervePathBuilder.hpp" +#include "trajopt/solution/SwerveSolution.hpp" namespace trajopt { diff --git a/include/trajopt/SymbolExports.h b/include/trajopt/SymbolExports.hpp similarity index 100% rename from include/trajopt/SymbolExports.h rename to include/trajopt/SymbolExports.hpp diff --git a/include/trajopt/constraint/AngularVelocityConstraint.h b/include/trajopt/constraint/AngularVelocityConstraint.hpp similarity index 78% rename from include/trajopt/constraint/AngularVelocityConstraint.h rename to include/trajopt/constraint/AngularVelocityConstraint.hpp index f60313ee..920a480a 100644 --- a/include/trajopt/constraint/AngularVelocityConstraint.h +++ b/include/trajopt/constraint/AngularVelocityConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/Constraint.h b/include/trajopt/constraint/Constraint.hpp similarity index 86% rename from include/trajopt/constraint/Constraint.h rename to include/trajopt/constraint/Constraint.hpp index 60c73837..3f81de88 100644 --- a/include/trajopt/constraint/Constraint.h +++ b/include/trajopt/constraint/Constraint.hpp @@ -4,11 +4,11 @@ #include -#include "trajopt/constraint/HeadingConstraint.h" -#include "trajopt/constraint/LinePointConstraint.h" -#include "trajopt/constraint/PointLineConstraint.h" -#include "trajopt/constraint/PointPointConstraint.h" -#include "trajopt/constraint/TranslationConstraint.h" +#include "trajopt/constraint/HeadingConstraint.hpp" +#include "trajopt/constraint/LinePointConstraint.hpp" +#include "trajopt/constraint/PointLineConstraint.hpp" +#include "trajopt/constraint/PointPointConstraint.hpp" +#include "trajopt/constraint/TranslationConstraint.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/HeadingConstraint.h b/include/trajopt/constraint/HeadingConstraint.hpp similarity index 75% rename from include/trajopt/constraint/HeadingConstraint.h rename to include/trajopt/constraint/HeadingConstraint.hpp index 6151a62f..45e44c56 100644 --- a/include/trajopt/constraint/HeadingConstraint.h +++ b/include/trajopt/constraint/HeadingConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/LinePointConstraint.h b/include/trajopt/constraint/LinePointConstraint.hpp similarity index 90% rename from include/trajopt/constraint/LinePointConstraint.h rename to include/trajopt/constraint/LinePointConstraint.hpp index 16463fb9..ffdf1c34 100644 --- a/include/trajopt/constraint/LinePointConstraint.h +++ b/include/trajopt/constraint/LinePointConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/PointAtConstraint.h b/include/trajopt/constraint/PointAtConstraint.hpp similarity index 91% rename from include/trajopt/constraint/PointAtConstraint.h rename to include/trajopt/constraint/PointAtConstraint.hpp index ec79edc9..28d3d71d 100644 --- a/include/trajopt/constraint/PointAtConstraint.h +++ b/include/trajopt/constraint/PointAtConstraint.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/PointLineConstraint.h b/include/trajopt/constraint/PointLineConstraint.hpp similarity index 90% rename from include/trajopt/constraint/PointLineConstraint.h rename to include/trajopt/constraint/PointLineConstraint.hpp index 937b793a..0bbbde6d 100644 --- a/include/trajopt/constraint/PointLineConstraint.h +++ b/include/trajopt/constraint/PointLineConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/PointPointConstraint.h b/include/trajopt/constraint/PointPointConstraint.hpp similarity index 88% rename from include/trajopt/constraint/PointPointConstraint.h rename to include/trajopt/constraint/PointPointConstraint.hpp index 2db37a81..8343f4f0 100644 --- a/include/trajopt/constraint/PointPointConstraint.h +++ b/include/trajopt/constraint/PointPointConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/TranslationConstraint.h b/include/trajopt/constraint/TranslationConstraint.hpp similarity index 77% rename from include/trajopt/constraint/TranslationConstraint.h rename to include/trajopt/constraint/TranslationConstraint.hpp index ab78ef5a..809e9326 100644 --- a/include/trajopt/constraint/TranslationConstraint.h +++ b/include/trajopt/constraint/TranslationConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/Set2d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/Set2d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.h b/include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.hpp similarity index 79% rename from include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.h rename to include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.hpp index 99da1673..b4f7d6ff 100644 --- a/include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.h +++ b/include/trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/differential/DifferentialConstraint.h b/include/trajopt/constraint/differential/DifferentialConstraint.hpp similarity index 69% rename from include/trajopt/constraint/differential/DifferentialConstraint.h rename to include/trajopt/constraint/differential/DifferentialConstraint.hpp index efbd9f95..f48ca16a 100644 --- a/include/trajopt/constraint/differential/DifferentialConstraint.h +++ b/include/trajopt/constraint/differential/DifferentialConstraint.hpp @@ -2,11 +2,11 @@ #pragma once -#include "trajopt/constraint/AngularVelocityConstraint.h" -#include "trajopt/constraint/Constraint.h" -#include "trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.h" -#include "trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.h" -#include "trajopt/util/VariantCat.h" +#include "trajopt/constraint/AngularVelocityConstraint.hpp" +#include "trajopt/constraint/Constraint.hpp" +#include "trajopt/constraint/differential/DifferentialCentripetalAccelerationConstraint.hpp" +#include "trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.hpp" +#include "trajopt/util/VariantCat.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.h b/include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.hpp similarity index 78% rename from include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.h rename to include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.hpp index 7e8adccf..16b5d9c2 100644 --- a/include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.h +++ b/include/trajopt/constraint/differential/DifferentialTangentialVelocityConstraint.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/holonomic/HolonomicConstraint.h b/include/trajopt/constraint/holonomic/HolonomicConstraint.hpp similarity index 60% rename from include/trajopt/constraint/holonomic/HolonomicConstraint.h rename to include/trajopt/constraint/holonomic/HolonomicConstraint.hpp index 3fc1263a..b70618a2 100644 --- a/include/trajopt/constraint/holonomic/HolonomicConstraint.h +++ b/include/trajopt/constraint/holonomic/HolonomicConstraint.hpp @@ -2,11 +2,11 @@ #pragma once -#include "trajopt/constraint/AngularVelocityConstraint.h" -#include "trajopt/constraint/Constraint.h" -#include "trajopt/constraint/PointAtConstraint.h" -#include "trajopt/constraint/holonomic/HolonomicVelocityConstraint.h" -#include "trajopt/util/VariantCat.h" +#include "trajopt/constraint/AngularVelocityConstraint.hpp" +#include "trajopt/constraint/Constraint.hpp" +#include "trajopt/constraint/PointAtConstraint.hpp" +#include "trajopt/constraint/holonomic/HolonomicVelocityConstraint.hpp" +#include "trajopt/util/VariantCat.hpp" namespace trajopt { diff --git a/include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.h b/include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.hpp similarity index 72% rename from include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.h rename to include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.hpp index 850cb874..30eafc72 100644 --- a/include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.h +++ b/include/trajopt/constraint/holonomic/HolonomicVelocityConstraint.hpp @@ -2,9 +2,9 @@ #pragma once -#include "trajopt/SymbolExports.h" -#include "trajopt/constraint/Constraint.h" -#include "trajopt/set/Set2d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/constraint/Constraint.hpp" +#include "trajopt/set/Set2d.hpp" namespace trajopt { diff --git a/include/trajopt/drivetrain/DifferentialDrivetrain.h b/include/trajopt/drivetrain/DifferentialDrivetrain.hpp similarity index 95% rename from include/trajopt/drivetrain/DifferentialDrivetrain.h rename to include/trajopt/drivetrain/DifferentialDrivetrain.hpp index 94c796c6..2eeb990c 100644 --- a/include/trajopt/drivetrain/DifferentialDrivetrain.h +++ b/include/trajopt/drivetrain/DifferentialDrivetrain.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/drivetrain/SwerveDrivetrain.h b/include/trajopt/drivetrain/SwerveDrivetrain.hpp similarity index 89% rename from include/trajopt/drivetrain/SwerveDrivetrain.h rename to include/trajopt/drivetrain/SwerveDrivetrain.hpp index 6dcf0b42..7bac6122 100644 --- a/include/trajopt/drivetrain/SwerveDrivetrain.h +++ b/include/trajopt/drivetrain/SwerveDrivetrain.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/drivetrain/SwerveModule.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/drivetrain/SwerveModule.hpp" namespace trajopt { diff --git a/include/trajopt/drivetrain/SwerveModule.h b/include/trajopt/drivetrain/SwerveModule.hpp similarity index 96% rename from include/trajopt/drivetrain/SwerveModule.h rename to include/trajopt/drivetrain/SwerveModule.hpp index 6929c757..1a2f8bf8 100644 --- a/include/trajopt/drivetrain/SwerveModule.h +++ b/include/trajopt/drivetrain/SwerveModule.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/obstacle/Bumpers.h b/include/trajopt/obstacle/Bumpers.hpp similarity index 65% rename from include/trajopt/obstacle/Bumpers.h rename to include/trajopt/obstacle/Bumpers.hpp index 1abe7fdc..25cf71bb 100644 --- a/include/trajopt/obstacle/Bumpers.h +++ b/include/trajopt/obstacle/Bumpers.hpp @@ -2,8 +2,8 @@ #pragma once -#include "trajopt/obstacle/Obstacle.h" -#include "trajopt/obstacle/ObstaclePoint.h" +#include "trajopt/obstacle/Obstacle.hpp" +#include "trajopt/obstacle/ObstaclePoint.hpp" namespace trajopt { diff --git a/include/trajopt/obstacle/Obstacle.h b/include/trajopt/obstacle/Obstacle.hpp similarity index 88% rename from include/trajopt/obstacle/Obstacle.h rename to include/trajopt/obstacle/Obstacle.hpp index 12501e80..aa5cc6ab 100644 --- a/include/trajopt/obstacle/Obstacle.h +++ b/include/trajopt/obstacle/Obstacle.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/obstacle/ObstaclePoint.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/obstacle/ObstaclePoint.hpp" namespace trajopt { diff --git a/include/trajopt/obstacle/ObstaclePoint.h b/include/trajopt/obstacle/ObstaclePoint.hpp similarity index 91% rename from include/trajopt/obstacle/ObstaclePoint.h rename to include/trajopt/obstacle/ObstaclePoint.hpp index 5c91ee8c..be558b29 100644 --- a/include/trajopt/obstacle/ObstaclePoint.h +++ b/include/trajopt/obstacle/ObstaclePoint.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/path/InitialGuessPoint.h b/include/trajopt/path/InitialGuessPoint.hpp similarity index 93% rename from include/trajopt/path/InitialGuessPoint.h rename to include/trajopt/path/InitialGuessPoint.hpp index b4008331..583334e2 100644 --- a/include/trajopt/path/InitialGuessPoint.h +++ b/include/trajopt/path/InitialGuessPoint.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/path/Path.h b/include/trajopt/path/Path.hpp similarity index 84% rename from include/trajopt/path/Path.h rename to include/trajopt/path/Path.hpp index ec7ff858..1e115eba 100644 --- a/include/trajopt/path/Path.h +++ b/include/trajopt/path/Path.hpp @@ -7,12 +7,12 @@ #include #include -#include "trajopt/SymbolExports.h" -#include "trajopt/constraint/differential/DifferentialConstraint.h" -#include "trajopt/constraint/holonomic/HolonomicConstraint.h" -#include "trajopt/drivetrain/DifferentialDrivetrain.h" -#include "trajopt/drivetrain/SwerveDrivetrain.h" -#include "trajopt/solution/SwerveSolution.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/constraint/differential/DifferentialConstraint.hpp" +#include "trajopt/constraint/holonomic/HolonomicConstraint.hpp" +#include "trajopt/drivetrain/DifferentialDrivetrain.hpp" +#include "trajopt/drivetrain/SwerveDrivetrain.hpp" +#include "trajopt/solution/SwerveSolution.hpp" namespace trajopt { diff --git a/include/trajopt/path/SwervePathBuilder.h b/include/trajopt/path/SwervePathBuilder.hpp similarity index 97% rename from include/trajopt/path/SwervePathBuilder.h rename to include/trajopt/path/SwervePathBuilder.hpp index 69c4b075..1a7986ff 100644 --- a/include/trajopt/path/SwervePathBuilder.h +++ b/include/trajopt/path/SwervePathBuilder.hpp @@ -8,13 +8,13 @@ #include #include -#include "trajopt/drivetrain/SwerveDrivetrain.h" -#include "trajopt/obstacle/Bumpers.h" -#include "trajopt/obstacle/Obstacle.h" -#include "trajopt/path/InitialGuessPoint.h" -#include "trajopt/path/Path.h" -#include "trajopt/solution/Solution.h" -#include "trajopt/solution/SwerveSolution.h" +#include "trajopt/drivetrain/SwerveDrivetrain.hpp" +#include "trajopt/obstacle/Bumpers.hpp" +#include "trajopt/obstacle/Obstacle.hpp" +#include "trajopt/path/InitialGuessPoint.hpp" +#include "trajopt/path/Path.hpp" +#include "trajopt/solution/Solution.hpp" +#include "trajopt/solution/SwerveSolution.hpp" namespace trajopt { diff --git a/include/trajopt/set/ConeSet2d.h b/include/trajopt/set/ConeSet2d.hpp similarity index 88% rename from include/trajopt/set/ConeSet2d.h rename to include/trajopt/set/ConeSet2d.hpp index aca0b630..ddb838f6 100644 --- a/include/trajopt/set/ConeSet2d.h +++ b/include/trajopt/set/ConeSet2d.hpp @@ -5,8 +5,8 @@ #include #include -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/set/EllipticalSet2d.h b/include/trajopt/set/EllipticalSet2d.hpp similarity index 97% rename from include/trajopt/set/EllipticalSet2d.h rename to include/trajopt/set/EllipticalSet2d.hpp index fb6f7e22..130b5463 100644 --- a/include/trajopt/set/EllipticalSet2d.h +++ b/include/trajopt/set/EllipticalSet2d.hpp @@ -4,7 +4,7 @@ #include -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/set/IntervalSet1d.h b/include/trajopt/set/IntervalSet1d.hpp similarity index 98% rename from include/trajopt/set/IntervalSet1d.h rename to include/trajopt/set/IntervalSet1d.hpp index bc4773ec..38be8bd3 100644 --- a/include/trajopt/set/IntervalSet1d.h +++ b/include/trajopt/set/IntervalSet1d.hpp @@ -5,7 +5,7 @@ #include #include -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/set/LinearSet2d.h b/include/trajopt/set/LinearSet2d.hpp similarity index 86% rename from include/trajopt/set/LinearSet2d.h rename to include/trajopt/set/LinearSet2d.hpp index aac55f69..1bcfcd8b 100644 --- a/include/trajopt/set/LinearSet2d.h +++ b/include/trajopt/set/LinearSet2d.hpp @@ -2,7 +2,7 @@ #pragma once -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/set/RectangularSet2d.h b/include/trajopt/set/RectangularSet2d.hpp similarity index 90% rename from include/trajopt/set/RectangularSet2d.h rename to include/trajopt/set/RectangularSet2d.hpp index 1c9db041..4e5846bf 100644 --- a/include/trajopt/set/RectangularSet2d.h +++ b/include/trajopt/set/RectangularSet2d.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/set/IntervalSet1d.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/set/IntervalSet1d.hpp" namespace trajopt { diff --git a/include/trajopt/set/Set2d.h b/include/trajopt/set/Set2d.hpp similarity index 89% rename from include/trajopt/set/Set2d.h rename to include/trajopt/set/Set2d.hpp index d3781b5d..da78b146 100644 --- a/include/trajopt/set/Set2d.h +++ b/include/trajopt/set/Set2d.hpp @@ -4,10 +4,10 @@ #include -#include "trajopt/set/ConeSet2d.h" -#include "trajopt/set/EllipticalSet2d.h" -#include "trajopt/set/LinearSet2d.h" -#include "trajopt/set/RectangularSet2d.h" +#include "trajopt/set/ConeSet2d.hpp" +#include "trajopt/set/EllipticalSet2d.hpp" +#include "trajopt/set/LinearSet2d.hpp" +#include "trajopt/set/RectangularSet2d.hpp" namespace trajopt { diff --git a/include/trajopt/solution/DifferentialSolution.h b/include/trajopt/solution/DifferentialSolution.hpp similarity index 86% rename from include/trajopt/solution/DifferentialSolution.h rename to include/trajopt/solution/DifferentialSolution.hpp index 9bad9b02..493a5c85 100644 --- a/include/trajopt/solution/DifferentialSolution.h +++ b/include/trajopt/solution/DifferentialSolution.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/solution/Solution.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/solution/Solution.hpp" namespace trajopt { diff --git a/include/trajopt/solution/HolonomicSolution.h b/include/trajopt/solution/HolonomicSolution.hpp similarity index 88% rename from include/trajopt/solution/HolonomicSolution.h rename to include/trajopt/solution/HolonomicSolution.hpp index 67f5dc5f..36ccec7f 100644 --- a/include/trajopt/solution/HolonomicSolution.h +++ b/include/trajopt/solution/HolonomicSolution.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/solution/Solution.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/solution/Solution.hpp" namespace trajopt { diff --git a/include/trajopt/solution/Solution.h b/include/trajopt/solution/Solution.hpp similarity index 91% rename from include/trajopt/solution/Solution.h rename to include/trajopt/solution/Solution.hpp index 47c104bf..aae1ee5e 100644 --- a/include/trajopt/solution/Solution.h +++ b/include/trajopt/solution/Solution.hpp @@ -4,7 +4,7 @@ #include -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/solution/SwerveSolution.h b/include/trajopt/solution/SwerveSolution.hpp similarity index 82% rename from include/trajopt/solution/SwerveSolution.h rename to include/trajopt/solution/SwerveSolution.hpp index 78e7950d..dd74cd9b 100644 --- a/include/trajopt/solution/SwerveSolution.h +++ b/include/trajopt/solution/SwerveSolution.hpp @@ -4,8 +4,8 @@ #include -#include "trajopt/SymbolExports.h" -#include "trajopt/solution/HolonomicSolution.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/solution/HolonomicSolution.hpp" namespace trajopt { diff --git a/include/trajopt/trajectory/HolonomicTrajectory.h b/include/trajopt/trajectory/HolonomicTrajectory.hpp similarity index 89% rename from include/trajopt/trajectory/HolonomicTrajectory.h rename to include/trajopt/trajectory/HolonomicTrajectory.hpp index f18b1339..6e5d6dd1 100644 --- a/include/trajopt/trajectory/HolonomicTrajectory.h +++ b/include/trajopt/trajectory/HolonomicTrajectory.hpp @@ -5,10 +5,10 @@ #include #include -#include "trajopt/SymbolExports.h" -#include "trajopt/solution/HolonomicSolution.h" -#include "trajopt/solution/SwerveSolution.h" -#include "trajopt/trajectory/HolonomicTrajectorySample.h" +#include "trajopt/SymbolExports.hpp" +#include "trajopt/solution/HolonomicSolution.hpp" +#include "trajopt/solution/SwerveSolution.hpp" +#include "trajopt/trajectory/HolonomicTrajectorySample.hpp" namespace trajopt { diff --git a/include/trajopt/trajectory/HolonomicTrajectorySample.h b/include/trajopt/trajectory/HolonomicTrajectorySample.hpp similarity index 98% rename from include/trajopt/trajectory/HolonomicTrajectorySample.h rename to include/trajopt/trajectory/HolonomicTrajectorySample.hpp index e76327a0..096e4039 100644 --- a/include/trajopt/trajectory/HolonomicTrajectorySample.h +++ b/include/trajopt/trajectory/HolonomicTrajectorySample.hpp @@ -5,7 +5,7 @@ #include #include -#include "trajopt/SymbolExports.h" +#include "trajopt/SymbolExports.hpp" namespace trajopt { diff --git a/include/trajopt/util/VariantCat.h b/include/trajopt/util/VariantCat.hpp similarity index 100% rename from include/trajopt/util/VariantCat.h rename to include/trajopt/util/VariantCat.hpp diff --git a/src/OptimalTrajectoryGenerator.cpp b/src/OptimalTrajectoryGenerator.cpp index a1dca585..daffe39b 100644 --- a/src/OptimalTrajectoryGenerator.cpp +++ b/src/OptimalTrajectoryGenerator.cpp @@ -1,12 +1,12 @@ // Copyright (c) TrajoptLib contributors -#include "trajopt/OptimalTrajectoryGenerator.h" +#include "trajopt/OptimalTrajectoryGenerator.hpp" #if defined(OPTIMIZER_BACKEND_SLEIPNIR) -#include "optimization/SleipnirOpti.h" +#include "optimization/SleipnirOpti.hpp" #endif -#include "optimization/algorithms/SwerveDiscreteOptimal.h" +#include "optimization/algorithms/SwerveDiscreteOptimal.hpp" namespace trajopt { diff --git a/src/lib.rs b/src/lib.rs index ea007333..cd392419 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,7 @@ mod ffi { } unsafe extern "C++" { - include!("trajoptlibrust.h"); + include!("trajoptlibrust.hpp"); type SwervePathBuilderImpl; diff --git a/src/optimization/Cancellation.cpp b/src/optimization/Cancellation.cpp index 9c4a1ce2..7a9b08b7 100644 --- a/src/optimization/Cancellation.cpp +++ b/src/optimization/Cancellation.cpp @@ -1,6 +1,6 @@ // Copyright (c) TrajoptLib contributors -#include "optimization/Cancellation.h" +#include "optimization/Cancellation.hpp" #include diff --git a/src/optimization/Cancellation.h b/src/optimization/Cancellation.hpp similarity index 100% rename from src/optimization/Cancellation.h rename to src/optimization/Cancellation.hpp diff --git a/src/optimization/HolonomicTrajoptUtil.h b/src/optimization/HolonomicTrajoptUtil.hpp similarity index 89% rename from src/optimization/HolonomicTrajoptUtil.h rename to src/optimization/HolonomicTrajoptUtil.hpp index 6e455b39..d96a64e1 100644 --- a/src/optimization/HolonomicTrajoptUtil.h +++ b/src/optimization/HolonomicTrajoptUtil.hpp @@ -2,13 +2,13 @@ #pragma once -#include "optimization/TrajoptUtil.h" -#include "trajopt/constraint/HeadingConstraint.h" -#include "trajopt/constraint/LinePointConstraint.h" -#include "trajopt/constraint/PointAtConstraint.h" -#include "trajopt/constraint/PointLineConstraint.h" -#include "trajopt/constraint/PointPointConstraint.h" -#include "trajopt/constraint/TranslationConstraint.h" +#include "optimization/TrajoptUtil.hpp" +#include "trajopt/constraint/HeadingConstraint.hpp" +#include "trajopt/constraint/LinePointConstraint.hpp" +#include "trajopt/constraint/PointAtConstraint.hpp" +#include "trajopt/constraint/PointLineConstraint.hpp" +#include "trajopt/constraint/PointPointConstraint.hpp" +#include "trajopt/constraint/TranslationConstraint.hpp" namespace trajopt { diff --git a/src/optimization/OptiSys.h b/src/optimization/OptiSys.hpp similarity index 100% rename from src/optimization/OptiSys.h rename to src/optimization/OptiSys.hpp diff --git a/src/optimization/SleipnirOpti.cpp b/src/optimization/SleipnirOpti.cpp index 085da911..9d72be48 100644 --- a/src/optimization/SleipnirOpti.cpp +++ b/src/optimization/SleipnirOpti.cpp @@ -1,17 +1,14 @@ // Copyright (c) TrajoptLib contributors -#include "optimization/SleipnirOpti.h" +#include "optimization/SleipnirOpti.hpp" -#include -#include -#include #include #include #include #include -#include "optimization/Cancellation.h" +#include "optimization/Cancellation.hpp" namespace trajopt { diff --git a/src/optimization/SleipnirOpti.h b/src/optimization/SleipnirOpti.hpp similarity index 98% rename from src/optimization/SleipnirOpti.h rename to src/optimization/SleipnirOpti.hpp index ea130c08..7c067b50 100644 --- a/src/optimization/SleipnirOpti.h +++ b/src/optimization/SleipnirOpti.hpp @@ -10,7 +10,7 @@ #include #include -#include "optimization/OptiSys.h" +#include "optimization/OptiSys.hpp" #include "trajopt/expected" namespace trajopt { diff --git a/src/optimization/SwerveTrajoptUtil.h b/src/optimization/SwerveTrajoptUtil.hpp similarity index 98% rename from src/optimization/SwerveTrajoptUtil.h rename to src/optimization/SwerveTrajoptUtil.hpp index e2901b32..91320f20 100644 --- a/src/optimization/SwerveTrajoptUtil.h +++ b/src/optimization/SwerveTrajoptUtil.hpp @@ -5,9 +5,9 @@ #include #include -#include "optimization/TrajoptUtil.h" -#include "trajopt/drivetrain/SwerveDrivetrain.h" -#include "trajopt/solution/SwerveSolution.h" +#include "optimization/TrajoptUtil.hpp" +#include "trajopt/drivetrain/SwerveDrivetrain.hpp" +#include "trajopt/solution/SwerveSolution.hpp" namespace trajopt { diff --git a/src/optimization/TrajoptUtil.h b/src/optimization/TrajoptUtil.hpp similarity index 96% rename from src/optimization/TrajoptUtil.h rename to src/optimization/TrajoptUtil.hpp index 556f712b..64e0df78 100644 --- a/src/optimization/TrajoptUtil.h +++ b/src/optimization/TrajoptUtil.hpp @@ -7,20 +7,20 @@ #include #include -#include "optimization/OptiSys.h" -#include "trajopt/constraint/Constraint.h" -#include "trajopt/constraint/LinePointConstraint.h" -#include "trajopt/constraint/PointLineConstraint.h" -#include "trajopt/constraint/PointPointConstraint.h" -#include "trajopt/constraint/TranslationConstraint.h" -#include "trajopt/path/InitialGuessPoint.h" -#include "trajopt/set/ConeSet2d.h" -#include "trajopt/set/EllipticalSet2d.h" -#include "trajopt/set/IntervalSet1d.h" -#include "trajopt/set/LinearSet2d.h" -#include "trajopt/set/RectangularSet2d.h" -#include "trajopt/set/Set2d.h" -#include "trajopt/solution/Solution.h" +#include "optimization/OptiSys.hpp" +#include "trajopt/constraint/Constraint.hpp" +#include "trajopt/constraint/LinePointConstraint.hpp" +#include "trajopt/constraint/PointLineConstraint.hpp" +#include "trajopt/constraint/PointPointConstraint.hpp" +#include "trajopt/constraint/TranslationConstraint.hpp" +#include "trajopt/path/InitialGuessPoint.hpp" +#include "trajopt/set/ConeSet2d.hpp" +#include "trajopt/set/EllipticalSet2d.hpp" +#include "trajopt/set/IntervalSet1d.hpp" +#include "trajopt/set/LinearSet2d.hpp" +#include "trajopt/set/RectangularSet2d.hpp" +#include "trajopt/set/Set2d.hpp" +#include "trajopt/solution/Solution.hpp" namespace trajopt { diff --git a/src/optimization/algorithms/SwerveDiscreteOptimal.h b/src/optimization/algorithms/SwerveDiscreteOptimal.hpp similarity index 95% rename from src/optimization/algorithms/SwerveDiscreteOptimal.h rename to src/optimization/algorithms/SwerveDiscreteOptimal.hpp index 33143ab0..13fb6300 100644 --- a/src/optimization/algorithms/SwerveDiscreteOptimal.h +++ b/src/optimization/algorithms/SwerveDiscreteOptimal.hpp @@ -7,14 +7,14 @@ #include #include -#include "optimization/HolonomicTrajoptUtil.h" -#include "optimization/OptiSys.h" -#include "optimization/SwerveTrajoptUtil.h" -#include "optimization/TrajoptUtil.h" -#include "trajopt/drivetrain/SwerveDrivetrain.h" +#include "optimization/HolonomicTrajoptUtil.hpp" +#include "optimization/OptiSys.hpp" +#include "optimization/SwerveTrajoptUtil.hpp" +#include "optimization/TrajoptUtil.hpp" +#include "trajopt/drivetrain/SwerveDrivetrain.hpp" #include "trajopt/expected" -#include "trajopt/path/Path.h" -#include "trajopt/solution/SwerveSolution.h" +#include "trajopt/path/Path.hpp" +#include "trajopt/solution/SwerveSolution.hpp" namespace trajopt { diff --git a/src/path/SwervePathBuilder.cpp b/src/path/SwervePathBuilder.cpp index b460a7e9..4a11073d 100644 --- a/src/path/SwervePathBuilder.cpp +++ b/src/path/SwervePathBuilder.cpp @@ -1,25 +1,25 @@ // Copyright (c) TrajoptLib contributors -#include "trajopt/path/SwervePathBuilder.h" +#include "trajopt/path/SwervePathBuilder.hpp" #include #include #include -#include "optimization/Cancellation.h" -#include "optimization/TrajoptUtil.h" -#include "trajopt/constraint/AngularVelocityConstraint.h" -#include "trajopt/constraint/Constraint.h" -#include "trajopt/constraint/HeadingConstraint.h" -#include "trajopt/constraint/LinePointConstraint.h" -#include "trajopt/constraint/PointLineConstraint.h" -#include "trajopt/constraint/TranslationConstraint.h" -#include "trajopt/constraint/holonomic/HolonomicVelocityConstraint.h" -#include "trajopt/obstacle/Obstacle.h" -#include "trajopt/set/EllipticalSet2d.h" -#include "trajopt/set/IntervalSet1d.h" -#include "trajopt/set/LinearSet2d.h" -#include "trajopt/set/RectangularSet2d.h" +#include "optimization/Cancellation.hpp" +#include "optimization/TrajoptUtil.hpp" +#include "trajopt/constraint/AngularVelocityConstraint.hpp" +#include "trajopt/constraint/Constraint.hpp" +#include "trajopt/constraint/HeadingConstraint.hpp" +#include "trajopt/constraint/LinePointConstraint.hpp" +#include "trajopt/constraint/PointLineConstraint.hpp" +#include "trajopt/constraint/TranslationConstraint.hpp" +#include "trajopt/constraint/holonomic/HolonomicVelocityConstraint.hpp" +#include "trajopt/obstacle/Obstacle.hpp" +#include "trajopt/set/EllipticalSet2d.hpp" +#include "trajopt/set/IntervalSet1d.hpp" +#include "trajopt/set/LinearSet2d.hpp" +#include "trajopt/set/RectangularSet2d.hpp" namespace trajopt { diff --git a/src/trajoptlibrust.cpp b/src/trajoptlibrust.cpp index 1e2faec6..39e48aa7 100644 --- a/src/trajoptlibrust.cpp +++ b/src/trajoptlibrust.cpp @@ -1,22 +1,18 @@ // Copyright (c) TrajoptLib contributors -#include "trajoptlibrust.h" +#include "trajoptlibrust.hpp" #include -#include -#include #include #include #include -#include #include -#include "trajopt/OptimalTrajectoryGenerator.h" -#include "trajopt/drivetrain/SwerveDrivetrain.h" -#include "trajopt/path/SwervePathBuilder.h" -#include "trajopt/trajectory/HolonomicTrajectory.h" -#include "trajopt/trajectory/HolonomicTrajectorySample.h" +#include "trajopt/OptimalTrajectoryGenerator.hpp" +#include "trajopt/drivetrain/SwerveDrivetrain.hpp" +#include "trajopt/trajectory/HolonomicTrajectory.hpp" +#include "trajopt/trajectory/HolonomicTrajectorySample.hpp" #include "trajoptlib/src/lib.rs.h" namespace trajoptlibrust { diff --git a/src/trajoptlibrust.h b/src/trajoptlibrust.hpp similarity index 98% rename from src/trajoptlibrust.h rename to src/trajoptlibrust.hpp index baa719b1..73005112 100644 --- a/src/trajoptlibrust.h +++ b/src/trajoptlibrust.hpp @@ -4,11 +4,10 @@ #include #include -#include #include -#include "trajopt/path/SwervePathBuilder.h" +#include "trajopt/path/SwervePathBuilder.hpp" namespace trajoptlibrust { diff --git a/test/include/TestOpti.h b/test/include/TestOpti.hpp similarity index 93% rename from test/include/TestOpti.h rename to test/include/TestOpti.hpp index 48598eba..e842f01a 100644 --- a/test/include/TestOpti.h +++ b/test/include/TestOpti.hpp @@ -4,13 +4,11 @@ #include #include -#include #include -#include #include -#include "optimization/OptiSys.h" +#include "optimization/OptiSys.hpp" class TestOpti { double minimizeObjective = 0.0; diff --git a/test/src/ObstacleTest.cpp b/test/src/ObstacleTest.cpp index ae34fea4..2e073e95 100644 --- a/test/src/ObstacleTest.cpp +++ b/test/src/ObstacleTest.cpp @@ -3,9 +3,9 @@ #include #include -#include -#include -#include +#include +#include +#include TEST_CASE("Obstacle - Linear initial guess", "[Obstacle]") { SKIP("Fails"); diff --git a/test/src/SwervePathBuilderTest.cpp b/test/src/SwervePathBuilderTest.cpp index 2bfc289d..dfc48038 100644 --- a/test/src/SwervePathBuilderTest.cpp +++ b/test/src/SwervePathBuilderTest.cpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include TEST_CASE("SwervePathBuilder - Linear initial guess", "[SwervePathBuilder]") { using namespace trajopt; diff --git a/test/src/SwerveTrajoptUtilTest.cpp b/test/src/SwerveTrajoptUtilTest.cpp index 06b07d66..b4f3dc97 100644 --- a/test/src/SwerveTrajoptUtilTest.cpp +++ b/test/src/SwerveTrajoptUtilTest.cpp @@ -4,12 +4,11 @@ #include #include -#include -#include +#include +#include -#include "TestOpti.h" -#include "optimization/SwerveTrajoptUtil.h" -#include "optimization/TrajoptUtil.h" +#include "TestOpti.hpp" +#include "optimization/SwerveTrajoptUtil.hpp" TEST_CASE("SwerveTrajoptUtil - SolveNetForce()", "[SwerveTrajoptUtil]") { std::vector Fx{4.0, 1.0, 3.0, 5.0}; diff --git a/test/src/TrajoptUtilTest.cpp b/test/src/TrajoptUtilTest.cpp index 8369b59a..90df0d25 100644 --- a/test/src/TrajoptUtilTest.cpp +++ b/test/src/TrajoptUtilTest.cpp @@ -3,11 +3,11 @@ #include #include -#include -#include +#include +#include -#include "TestOpti.h" -#include "optimization/TrajoptUtil.h" +#include "TestOpti.hpp" +#include "optimization/TrajoptUtil.hpp" TEST_CASE("TrajoptUtil - GetIdx()", "[TrajoptUtil]") { auto result0 = trajopt::GetIdx({2, 3}, 0, 0);