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

Commit

Permalink
nolint where necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
shueja committed Jun 22, 2024
1 parent a30fe94 commit f2bddad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions include/trajopt/set/ManifoldIntervalSet2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ struct TRAJOPT_DLLEXPORT ManifoldIntervalSet2d {
/// Half of the width of the valid range.
double tolerance;

/**
/**
* Construct a manifold vector bound to a particular value +- a tolerance.
*
* @param middle The angle at the midpoint of the valid range
* @param tolerance The tolerance. Must be positive. Tolerances greater than pi,
* (half the period) do not constrain the vector at all.
* @param tolerance The tolerance. Must be positive. Tolerances greater than
* pi, (half the period) do not constrain the vector at all.
*/
constexpr ManifoldIntervalSet2d(double middle, double tolerance)
: middle(middle), tolerance(tolerance) {
Expand All @@ -34,8 +34,7 @@ struct TRAJOPT_DLLEXPORT ManifoldIntervalSet2d {
* @param angle the angle of the vector to.
*/
constexpr ManifoldIntervalSet2d(double angle)
: ManifoldIntervalSet2d(angle, 0) {
}
: ManifoldIntervalSet2d(angle, 0) {}

constexpr ManifoldIntervalSet2d() = default;
};
Expand Down
2 changes: 1 addition & 1 deletion src/optimization/HolonomicTrajoptUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ inline void ApplyHolonomicConstraint(
auto dx = fieldPointX - x;
auto dy = fieldPointY - y;
auto dot = thetacos * dx + thetasin * dy;
problem.SubjectTo(dot >= std::cos(headingTolerance) * hypot(dx, dy));
problem.SubjectTo(dot >= std::cos(headingTolerance) * hypot(dx, dy)); //NOLINT
} else if (std::holds_alternative<PointLineConstraint>(constraint)) {
ApplyConstraint(problem, x, y, thetacos, thetasin,
std::get<PointLineConstraint>(constraint));
Expand Down
4 changes: 2 additions & 2 deletions src/optimization/SwerveTrajoptUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ inline void ApplyKinematicsConstraints(
(theta_cos_n * theta_cos_n_1) - (theta_sin_n * -theta_sin_n_1);
auto theta_diff_sin =
(theta_cos_n * -theta_sin_n_1) + (theta_sin_n * theta_cos_n_1);
problem.SubjectTo(theta_diff_cos * sin(omega_n * dt_sgmt) ==
theta_diff_sin * cos(omega_n * dt_sgmt));
problem.SubjectTo(theta_diff_cos * sin(omega_n * dt_sgmt) == //NOLINT
theta_diff_sin * cos(omega_n * dt_sgmt)); //NOLINT
problem.SubjectTo(
theta_cos_n_1 * theta_cos_n_1 + theta_sin_n_1 * theta_sin_n_1 == 1);
problem.SubjectTo(vx_n_1 + ax_n * dt_sgmt == vx_n);
Expand Down

0 comments on commit f2bddad

Please sign in to comment.