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

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Feb 18, 2024
1 parent 7633508 commit a23cddd
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 99 deletions.
2 changes: 0 additions & 2 deletions .styleguide
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ licenseUpdateExclude {

includeOtherLibs {
^Eigen/
^fmt/
^casadi/
^sleipnir/
^gtest/
}
31 changes: 31 additions & 0 deletions emscripten/.styleguide
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
cppHeaderFileInclude {
\.h$
\.hpp$
\.inc$
}

cppSrcFileInclude {
\.cpp$
}

modifiableFileExclude {
jni/jni\.h$
jni/darwin/jni_md\.h$
jni/linux/jni_md\.h$
jni/win32/jni_md\.h$
\.jar$
}

licenseUpdateExclude {
java/src/main/java/org/team2363/util/DependencyExtractor\.java$
java/src/main/java/org/team2363/util/RuntimeDetector\.java$
java/src/main/java/org/team2363/util/RuntimeLoader\.java$
}

includeOtherLibs {
^Eigen/
^casadi/
^emscripten/
^sleipnir/
^trajopt/
}
15 changes: 7 additions & 8 deletions emscripten/TrajoptLibEmbind.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// Copyright (c) TrajoptLib contributors

#include <drivetrain/SwerveDrivetrain.h>
#include <drivetrain/SwerveModule.h>
#include <emscripten/bind.h>
#include <path/HolonomicPath.h>
#include <trajectory/HolonomicTrajectory.h>
#include <trajectory/HolonomicTrajectorySample.h>

#include <vector>

#include <OptimalTrajectoryGenerator.h>
#include <emscripten/bind.h>
#include <trajopt/OptimalTrajectoryGenerator.h>
#include <trajopt/drivetrain/SwerveDrivetrain.h>
#include <trajopt/drivetrain/SwerveModule.h>
#include <trajopt/path/HolonomicPath.h>
#include <trajopt/trajectory/HolonomicTrajectory.h>
#include <trajopt/trajectory/HolonomicTrajectorySample.h>

using namespace emscripten;
using namespace trajopt;
Expand Down
71 changes: 0 additions & 71 deletions include/trajectory/HolonomicTrajectory.h

This file was deleted.

7 changes: 7 additions & 0 deletions include/trajopt/trajectory/HolonomicTrajectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ class TRAJOPT_DLLEXPORT HolonomicTrajectory {
* @param solution The solution.
*/
explicit HolonomicTrajectory(const HolonomicSolution& solution);

/**
* Construct a HolonomicTrajectory from a solution.
*
* @param solution The solution.
*/
static HolonomicTrajectory FromSolution(const HolonomicSolution& solution);
};

} // namespace trajopt
6 changes: 3 additions & 3 deletions include/trajopt/trajectory/HolonomicTrajectorySample.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class TRAJOPT_DLLEXPORT HolonomicTrajectorySample {
* @param velocityY The velocity's y component.
* @param angularVelocity The angular velocity.
*/
// HolonomicTrajectorySample(double timestamp, double x, double y,
// double heading, double velocityX, double
// velocityY, double angularVelocity);
HolonomicTrajectorySample(double timestamp, double x, double y,
double heading, double velocityX, double velocityY,
double angularVelocity);
};

} // namespace trajopt
3 changes: 2 additions & 1 deletion src/trajectory/HolonomicTrajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ HolonomicTrajectory HolonomicTrajectory::FromSolution(
ts, solution.x[samp], solution.y[samp], solution.theta[samp],
solution.vx[samp], solution.vy[samp], solution.omega[samp]});
}
return {samples};
return HolonomicTrajectory{samples};
}

} // namespace trajopt
26 changes: 12 additions & 14 deletions src/trajectory/HolonomicTrajectorySample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@

namespace trajopt {

// HolonomicTrajectorySample::HolonomicTrajectorySample(double timestamp, double
// x,
// double y, double
// heading, double
// velocityX, double
// velocityY, double
// angularVelocity)
// : timestamp(timestamp),
// x(x),
// y(y),
// heading(heading),
// velocityX(velocityX),
// velocityY(velocityY),
// angularVelocity(angularVelocity) {}
HolonomicTrajectorySample::HolonomicTrajectorySample(double timestamp, double x,
double y, double heading,
double velocityX,
double velocityY,
double angularVelocity)
: timestamp(timestamp),
x(x),
y(y),
heading(heading),
velocityX(velocityX),
velocityY(velocityY),
angularVelocity(angularVelocity) {}

} // namespace trajopt

0 comments on commit a23cddd

Please sign in to comment.