From f2bddad6486e82da4f87c0ba9da167beb363f4eb Mon Sep 17 00:00:00 2001 From: shueja-personal Date: Fri, 21 Jun 2024 21:29:21 -0700 Subject: [PATCH] nolint where necessary --- include/trajopt/set/ManifoldIntervalSet2d.hpp | 9 ++++----- src/optimization/HolonomicTrajoptUtil.hpp | 2 +- src/optimization/SwerveTrajoptUtil.hpp | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/trajopt/set/ManifoldIntervalSet2d.hpp b/include/trajopt/set/ManifoldIntervalSet2d.hpp index f046d687..e156f4f5 100644 --- a/include/trajopt/set/ManifoldIntervalSet2d.hpp +++ b/include/trajopt/set/ManifoldIntervalSet2d.hpp @@ -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) { @@ -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; }; diff --git a/src/optimization/HolonomicTrajoptUtil.hpp b/src/optimization/HolonomicTrajoptUtil.hpp index 8d2462f7..1b42c473 100644 --- a/src/optimization/HolonomicTrajoptUtil.hpp +++ b/src/optimization/HolonomicTrajoptUtil.hpp @@ -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(constraint)) { ApplyConstraint(problem, x, y, thetacos, thetasin, std::get(constraint)); diff --git a/src/optimization/SwerveTrajoptUtil.hpp b/src/optimization/SwerveTrajoptUtil.hpp index e42ccc80..3dc40b1f 100644 --- a/src/optimization/SwerveTrajoptUtil.hpp +++ b/src/optimization/SwerveTrajoptUtil.hpp @@ -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);