diff --git a/common/autoware_auto_common/include/helper_functions/message_adapters.hpp b/common/autoware_auto_common/include/helper_functions/message_adapters.hpp index 4d5dbec213aa8..352ef7c7b65d5 100644 --- a/common/autoware_auto_common/include/helper_functions/message_adapters.hpp +++ b/common/autoware_auto_common/include/helper_functions/message_adapters.hpp @@ -34,7 +34,7 @@ namespace message_field_adapters /// Using alias for Time message using TimeStamp = builtin_interfaces::msg::Time; -/// \brief Helper class to check existance of header file in compile time: +/// \brief Helper class to check existence of header file in compile time: /// https://stackoverflow.com/a/16000226/2325407 template struct HasHeader : std::false_type diff --git a/common/autoware_auto_common/test/test_template_utils.cpp b/common/autoware_auto_common/test/test_template_utils.cpp index 5ef1dea5b8ad1..9c9ca9ae4b5f2 100644 --- a/common/autoware_auto_common/test/test_template_utils.cpp +++ b/common/autoware_auto_common/test/test_template_utils.cpp @@ -60,6 +60,7 @@ template using false_bar_expression2 = decltype(std::declval().bar(std::declval(), std::declval())); +// cspell: ignore asdasd // Signature mismatch: template using false_bar_expression3 = decltype(std::declval().asdasd( diff --git a/common/autoware_auto_geometry/include/geometry/bounding_box/bounding_box_common.hpp b/common/autoware_auto_geometry/include/geometry/bounding_box/bounding_box_common.hpp index 10c8b48f6f546..d1dee63f73b56 100644 --- a/common/autoware_auto_geometry/include/geometry/bounding_box/bounding_box_common.hpp +++ b/common/autoware_auto_geometry/include/geometry/bounding_box/bounding_box_common.hpp @@ -107,7 +107,7 @@ template using Point4 = std::array; /// \brief Helper struct for compile time introspection of array size from -/// stackoverflow.com/questions/16866033/getting-the-number-of-elements-in-stdarray-at-compile-time +/// Ref: https://stackoverflow.com/questions/16866033 template struct array_size; template @@ -132,7 +132,7 @@ finalize_box(const decltype(BoundingBox::corners) & corners, BoundingBox & box); /// \brief given support points and two orthogonal directions, compute corners of bounding box /// \tparam PointT Type of a point, must have float members x and y` -/// \tparam IT An iterator dereferencable into PointT +/// \tparam IT An iterator dereferenceable into PointT /// \param[out] corners Gets filled with corner points of bounding box /// \param[in] supports Iterators referring to support points of current bounding box /// e.g. bounding box is touching these points diff --git a/common/autoware_auto_geometry/include/geometry/bounding_box/eigenbox_2d.hpp b/common/autoware_auto_geometry/include/geometry/bounding_box/eigenbox_2d.hpp index 9ee460895a0c4..ae142badec4eb 100644 --- a/common/autoware_auto_geometry/include/geometry/bounding_box/eigenbox_2d.hpp +++ b/common/autoware_auto_geometry/include/geometry/bounding_box/eigenbox_2d.hpp @@ -18,6 +18,7 @@ /// \brief This file implements 2D pca on a linked list of points to estimate an oriented /// bounding box +// cspell: ignore eigenbox, EIGENBOX #ifndef GEOMETRY__BOUNDING_BOX__EIGENBOX_2D_HPP_ #define GEOMETRY__BOUNDING_BOX__EIGENBOX_2D_HPP_ @@ -50,11 +51,12 @@ struct Covariance2d std::size_t num_points; }; // struct Covariance2d +// cspell: ignore Welford /// \brief Compute 2d covariance matrix of a list of points using Welford's online algorithm /// \param[in] begin An iterator pointing to the first point in a point list /// \param[in] end An iterator pointing to one past the last point in the point list -/// \tparam IT An iterator type dereferencable into a point with float members x and y -/// \return A 2d covariance matrix for all points inthe list +/// \tparam IT An iterator type dereferenceable into a point with float members x and y +/// \return A 2d covariance matrix for all points in the list template Covariance2d covariance_2d(const IT begin, const IT end) { @@ -93,13 +95,14 @@ Covariance2d covariance_2d(const IT begin, const IT end) /// \brief Compute eigenvectors and eigenvalues /// \param[in] cov 2d Covariance matrix -/// \param[out] eigvec1 First eigenvector -/// \param[out] eigvec2 Second eigenvector +/// \param[out] eig_vec1 First eigenvector +/// \param[out] eig_vec2 Second eigenvector /// \tparam PointT Point type that has at least float members x and y /// \return A pairt of eigenvalues: The first is the larger eigenvalue /// \throw std::runtime error if you would get degenerate covariance template -std::pair eig_2d(const Covariance2d & cov, PointT & eigvec1, PointT & eigvec2) +std::pair eig_2d( + const Covariance2d & cov, PointT & eig_vec1, PointT & eig_vec2) { const float32_t tr_2 = (cov.xx + cov.yy) * 0.5F; const float32_t det = (cov.xx * cov.yy) - (cov.xy * cov.xy); @@ -120,28 +123,28 @@ std::pair eig_2d(const Covariance2d & cov, PointT & eigvec // are persistent against further calculations. // (e.g. taking cross product of two eigen vectors) if (fabsf(cov.xy * cov.xy) > std::numeric_limits::epsilon()) { - xr_(eigvec1) = cov.xy; - yr_(eigvec1) = ret.first - cov.xx; - xr_(eigvec2) = cov.xy; - yr_(eigvec2) = ret.second - cov.xx; + xr_(eig_vec1) = cov.xy; + yr_(eig_vec1) = ret.first - cov.xx; + xr_(eig_vec2) = cov.xy; + yr_(eig_vec2) = ret.second - cov.xx; } else { if (cov.xx > cov.yy) { - xr_(eigvec1) = 1.0F; - yr_(eigvec1) = 0.0F; - xr_(eigvec2) = 0.0F; - yr_(eigvec2) = 1.0F; + xr_(eig_vec1) = 1.0F; + yr_(eig_vec1) = 0.0F; + xr_(eig_vec2) = 0.0F; + yr_(eig_vec2) = 1.0F; } else { - xr_(eigvec1) = 0.0F; - yr_(eigvec1) = 1.0F; - xr_(eigvec2) = 1.0F; - yr_(eigvec2) = 0.0F; + xr_(eig_vec1) = 0.0F; + yr_(eig_vec1) = 1.0F; + xr_(eig_vec2) = 1.0F; + yr_(eig_vec2) = 0.0F; } } return ret; } /// \brief Given eigenvectors, compute support (furthest) point in each direction -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y /// \tparam PointT type of a point with float members x and y /// \param[in] begin An iterator pointing to the first point in a point list /// \param[in] end An iterator pointing to one past the last point in the point list @@ -183,7 +186,7 @@ bool8_t compute_supports( } /// \brief Compute bounding box given a pair of basis directions -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y /// \tparam PointT Point type of the lists, must have float members x and y /// \param[in] ax1 First basis direction, assumed to be normal to ax2 /// \param[in] ax2 Second basis direction, assumed to be normal to ax1, assumed to be ccw wrt ax1 @@ -210,7 +213,7 @@ BoundingBox compute_bounding_box( /// modify the list. The resulting bounding box is not necessarily minimum in any way /// \param[in] begin An iterator pointing to the first point in a point list /// \param[in] end An iterator pointing to one past the last point in the point list -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y /// \return An oriented bounding box in x-y. This bounding box has no height information template BoundingBox eigenbox_2d(const IT begin, const IT end) @@ -222,7 +225,7 @@ BoundingBox eigenbox_2d(const IT begin, const IT end) using PointT = details::base_type; PointT eig1; PointT eig2; - const auto eigv = details::eig_2d(cov, eig1, eig2); + const auto eig_v = details::eig_2d(cov, eig1, eig2); // find extreme points details::Point4 supports; @@ -232,7 +235,7 @@ BoundingBox eigenbox_2d(const IT begin, const IT end) std::swap(eig1, eig2); } BoundingBox bbox = details::compute_bounding_box(eig1, eig2, supports); - bbox.value = eigv.first; + bbox.value = eig_v.first; return bbox; } diff --git a/common/autoware_auto_geometry/include/geometry/bounding_box/lfit.hpp b/common/autoware_auto_geometry/include/geometry/bounding_box/lfit.hpp index ac8ed09b4036e..9b8991a7c7132 100644 --- a/common/autoware_auto_geometry/include/geometry/bounding_box/lfit.hpp +++ b/common/autoware_auto_geometry/include/geometry/bounding_box/lfit.hpp @@ -18,6 +18,8 @@ /// \brief This file implements 2D pca on a linked list of points to estimate an oriented /// bounding box +// cspell: ignore LFIT, lfit +// LFIT means "L-Shape Fitting" #ifndef GEOMETRY__BOUNDING_BOX__LFIT_HPP_ #define GEOMETRY__BOUNDING_BOX__LFIT_HPP_ @@ -117,8 +119,8 @@ float32_t solve_lfit(const LFitWs & ws, PointT & dir) ws.m22d - (((ws.m12b * ws.m12b) * pi) + ((ws.m12d * ws.m12d) * qi)), ws.m22b - (((ws.m12a * ws.m12b) * pi) + ((ws.m12c * ws.m12d) * qi)), 0UL}; PointT eig1; - const auto eigv = eig_2d(M, eig1, dir); - return eigv.second; + const auto eig_v = eig_2d(M, eig1, dir); + return eig_v.second; } /// \brief Increments L fit M matrix with information in the point @@ -176,7 +178,7 @@ class LFitCompare /// \param[in] end An iterator pointing to one past the last point in the point list /// \param[in] size The number of points in the point list /// \return A bounding box that minimizes the LFit residual -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y template BoundingBox lfit_bounding_box_2d_impl(const IT begin, const IT end, const std::size_t size) { @@ -207,11 +209,11 @@ BoundingBox lfit_bounding_box_2d_impl(const IT begin, const IT end, const std::s } } // can recover best corner point, but don't care, need to cover all points - const auto inorm = 1.0F / norm_2d(best_normal); - if (!std::isnormal(inorm)) { + const auto inv_norm = 1.0F / norm_2d(best_normal); + if (!std::isnormal(inv_norm)) { throw std::runtime_error{"LFit: Abnormal norm"}; } - best_normal = times_2d(best_normal, inorm); + best_normal = times_2d(best_normal, inv_norm); auto best_tangent = get_normal(best_normal); // find extreme points Point4 supports; @@ -235,7 +237,7 @@ BoundingBox lfit_bounding_box_2d_impl(const IT begin, const IT end, const std::s /// \param[in] hint An iterator pointing to the point whose normal will be used to sort the list /// \return A pair where the first element is an iterator pointing to the nearest point, and the /// second element is the size of the list -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y /// \throw std::domain_error If the number of points is too few template BoundingBox lfit_bounding_box_2d( @@ -258,7 +260,7 @@ BoundingBox lfit_bounding_box_2d( /// \return An oriented bounding box in x-y. This bounding box has no height information /// \param[in] begin An iterator pointing to the first point in a point list /// \param[in] end An iterator pointing to one past the last point in the point list -/// \tparam IT An iterator type dereferencable into a point with float members x and y +/// \tparam IT An iterator type dereferenceable into a point with float members x and y template BoundingBox lfit_bounding_box_2d(const IT begin, const IT end) { diff --git a/common/autoware_auto_geometry/include/geometry/bounding_box/rotating_calipers.hpp b/common/autoware_auto_geometry/include/geometry/bounding_box/rotating_calipers.hpp index 9139a2055be12..5bc05810bb1b0 100644 --- a/common/autoware_auto_geometry/include/geometry/bounding_box/rotating_calipers.hpp +++ b/common/autoware_auto_geometry/include/geometry/bounding_box/rotating_calipers.hpp @@ -139,7 +139,7 @@ void init_bbox(const IT begin, const IT end, Point4 & support) /// \param[in] end An iterator to one past the last point on a convex hull /// \param[in] metric_fn A functor determining what measure the bounding box is minimum with respect /// to -/// \tparam IT An iterator type dereferencable into a point type with float members x and y +/// \tparam IT An iterator type dereferenceable into a point type with float members x and y /// \tparam MetricF A functor that computes a float measure from the x and y size (width and length) /// of a bounding box, assumed to be packed in a Point32 message. /// \throw std::domain_error if the list of points is too small to reasonable generate a bounding @@ -223,7 +223,7 @@ BoundingBox rotating_calipers_impl(const IT begin, const IT end, const MetricF m /// \param[in] begin An iterator to the first point on a convex hull /// \param[in] end An iterator to one past the last point on a convex hull /// \return A minimum area bounding box, value field is the area -/// \tparam IT An iterator type dereferencable into a point type with float members x and y +/// \tparam IT An iterator type dereferenceable into a point type with float members x and y template BoundingBox minimum_area_bounding_box(const IT begin, const IT end) { @@ -238,7 +238,7 @@ BoundingBox minimum_area_bounding_box(const IT begin, const IT end) /// \param[in] begin An iterator to the first point on a convex hull /// \param[in] end An iterator to one past the last point on a convex hull /// \return A minimum perimeter bounding box, value field is half the perimeter -/// \tparam IT An iterator type dereferencable into a point type with float members x and y +/// \tparam IT An iterator type dereferenceable into a point type with float members x and y template BoundingBox minimum_perimeter_bounding_box(const IT begin, const IT end) { diff --git a/common/autoware_auto_geometry/include/geometry/common_2d.hpp b/common/autoware_auto_geometry/include/geometry/common_2d.hpp index 018904d51dda3..fd045003521ea 100644 --- a/common/autoware_auto_geometry/include/geometry/common_2d.hpp +++ b/common/autoware_auto_geometry/include/geometry/common_2d.hpp @@ -262,7 +262,6 @@ T times_2d(const T & p, const float32_t a) /// \tparam T point type. Must have point adapters defined or have float members x and y /// \brief solve p + t * u = q + s * v /// Ref: https://stackoverflow.com/questions/563198/ -/// whats-the-most-efficent-way-to-calculate-where-two-line-segments-intersect /// \param[in] pt anchor point of first line /// \param[in] u direction of first line /// \param[in] q anchor point of second line @@ -274,6 +273,8 @@ inline T intersection_2d(const T & pt, const T & u, const T & q, const T & v) { const float32_t num = cross_2d(minus_2d(pt, q), u); float32_t den = cross_2d(v, u); + // cspell: ignore FEPS + // FEPS means "Float EPSilon" constexpr auto FEPS = std::numeric_limits::epsilon(); if (fabsf(den) < FEPS) { if (fabsf(num) < FEPS) { @@ -292,7 +293,7 @@ inline T intersection_2d(const T & pt, const T & u, const T & q, const T & v) /// \brief rotate point given precomputed sin and cos /// \param[inout] pt point to rotate /// \param[in] cos_th precomputed cosine value -/// \param[in] sin_th precompined sine value +/// \param[in] sin_th precomputed sine value template inline void rotate_2d(T & pt, const float32_t cos_th, const float32_t sin_th) { @@ -321,7 +322,7 @@ inline T rotate_2d(const T & pt, const float32_t th_rad) /// \brief compute q s.t. p T q, or p * q = 0 /// This is the equivalent of a 90 degree ccw rotation /// \param[in] pt point to get normal point of -/// \return point normal to p (unnormalized) +/// \return point normal to p (un-normalized) template inline T get_normal(const T & pt) { @@ -334,7 +335,7 @@ inline T get_normal(const T & pt) /// \tparam T point type. Must have point adapters defined or have float members x and y /// \brief get magnitude of x and y components: /// \param[in] pt point to get magnitude of -/// \return magitude of x and y components together +/// \return magnitude of x and y components together template inline auto norm_2d(const T & pt) { diff --git a/common/autoware_auto_geometry/include/geometry/convex_hull.hpp b/common/autoware_auto_geometry/include/geometry/convex_hull.hpp index 2687f04f33c7b..e690c4d07441b 100644 --- a/common/autoware_auto_geometry/include/geometry/convex_hull.hpp +++ b/common/autoware_auto_geometry/include/geometry/convex_hull.hpp @@ -136,6 +136,8 @@ typename std::list::const_iterator convex_hull_impl(std::list & const auto lexical_comparator = [](const PointT & a, const PointT & b) -> bool8_t { using point_adapter::x_; using point_adapter::y_; + // cspell: ignore FEPS + // FEPS means "Float EPSilon" constexpr auto FEPS = std::numeric_limits::epsilon(); return (fabsf(x_(a) - x_(b)) > FEPS) ? (x_(a) < x_(b)) : (y_(a) < y_(b)); }; diff --git a/common/autoware_auto_geometry/include/geometry/intersection.hpp b/common/autoware_auto_geometry/include/geometry/intersection.hpp index 174d18cd2b62c..87dc32b0190d0 100644 --- a/common/autoware_auto_geometry/include/geometry/intersection.hpp +++ b/common/autoware_auto_geometry/include/geometry/intersection.hpp @@ -83,7 +83,7 @@ std::vector get_sorted_face_list(const Iter start, const Iter end) return face_list; } -/// \brief Append points of the polygon `internal` that are contained in the polygon `exernal`. +/// \brief Append points of the polygon `internal` that are contained in the polygon `external`. template < template class Iterable1T, template class Iterable2T, typename PointT> void append_contained_points( @@ -147,6 +147,9 @@ void append_intersection_points( std::min(point_adapter::y_(edge2.first), point_adapter::y_(edge2.second)), std::max(point_adapter::y_(edge2.first), point_adapter::y_(edge2.second))}; + // cspell: ignore feps + // feps means "Float EPSilon" + // The accumulated floating point error depends on the magnitudes of each end of the // intervals. Hence the upper bound of the absolute magnitude should be taken into account // while computing the epsilon. @@ -274,7 +277,7 @@ std::list convex_polygon_intersection2d( /// \param polygon1 A convex polygon /// \param polygon2 A convex polygon /// \return (Intersection / Union) between two given polygons. -/// \throws std::domain_error If there is any inconsistency on the undderlying geometrical +/// \throws std::domain_error If there is any inconsistency on the underlying geometrical /// computation. template < template class Iterable1T, template class Iterable2T, typename PointT> diff --git a/common/autoware_auto_geometry/include/geometry/interval.hpp b/common/autoware_auto_geometry/include/geometry/interval.hpp index 10cab1a1d7b79..59c26f27cc454 100644 --- a/common/autoware_auto_geometry/include/geometry/interval.hpp +++ b/common/autoware_auto_geometry/include/geometry/interval.hpp @@ -256,8 +256,8 @@ bool Interval::abs_eq(const Interval & i1, const Interval & i2, const T & eps const auto both_non_empty = !Interval::empty(i1) && !Interval::empty(i2); const auto mins_equal = comp::abs_eq(Interval::min(i1), Interval::min(i2), eps); - const auto maxs_equal = comp::abs_eq(Interval::max(i1), Interval::max(i2), eps); - const auto both_non_empty_equal = both_non_empty && mins_equal && maxs_equal; + const auto maxes_equal = comp::abs_eq(Interval::max(i1), Interval::max(i2), eps); + const auto both_non_empty_equal = both_non_empty && mins_equal && maxes_equal; return both_empty || both_non_empty_equal; } @@ -286,7 +286,7 @@ bool Interval::bounds_valid(const Interval & i) { const auto is_ordered = (Interval::min(i) <= Interval::max(i)); - // Check for emptiness expicitly because it requires both bounds to be NaN + // Check for emptiness explicitly because it requires both bounds to be NaN return Interval::empty(i) || is_ordered; } diff --git a/common/autoware_auto_geometry/include/geometry/spatial_hash_config.hpp b/common/autoware_auto_geometry/include/geometry/spatial_hash_config.hpp index 227b4db7634cc..e118ec24c7759 100644 --- a/common/autoware_auto_geometry/include/geometry/spatial_hash_config.hpp +++ b/common/autoware_auto_geometry/include/geometry/spatial_hash_config.hpp @@ -52,7 +52,7 @@ namespace details { /// \brief Internal struct for packing three indices together /// -/// The use of this struct publically is a violation of our coding standards, but I claim it's +/// The use of this struct publicly is a violation of our coding standards, but I claim it's /// fine because (a) it's details, (b) it is literally three unrelated members packaged together. /// This type is needed for conceptual convenience so I don't have massive function parameter /// lists @@ -109,7 +109,9 @@ class GEOMETRY_PUBLIC Config : public autoware::common::helper_functions::crtp::epsilon(); // lint -e{1938} read only access is fine NOLINT m_max_x -= FEPS; @@ -134,17 +136,17 @@ class GEOMETRY_PUBLIC Config : public autoware::common::helper_functions::crtp(std::ceil(radius / m_side_length)); + const Index i_radius = static_cast(std::ceil(radius / m_side_length)); // Dumb ternary because potentially unsigned Index type - const Index xmin = (ref.x > iradius) ? (ref.x - iradius) : 0U; - const Index ymin = (ref.y > iradius) ? (ref.y - iradius) : 0U; - const Index zmin = (ref.z > iradius) ? (ref.z - iradius) : 0U; + const Index x_min = (ref.x > i_radius) ? (ref.x - i_radius) : 0U; + const Index y_min = (ref.y > i_radius) ? (ref.y - i_radius) : 0U; + const Index z_min = (ref.z > i_radius) ? (ref.z - i_radius) : 0U; // In 2D mode, m_max_z should be 0, same with ref.z - const Index xmax = std::min(ref.x + iradius, m_max_x_idx); - const Index ymax = std::min(ref.y + iradius, m_max_y_idx); - const Index zmax = std::min(ref.z + iradius, m_max_z_idx); + const Index x_max = std::min(ref.x + i_radius, m_max_x_idx); + const Index y_max = std::min(ref.y + i_radius, m_max_y_idx); + const Index z_max = std::min(ref.z + i_radius, m_max_z_idx); // return bottom-left portion of cube and top-right portion of cube - return {{xmin, ymin, zmin}, {xmax, ymax, zmax}}; + return {{x_min, y_min, z_min}, {x_max, y_max, z_max}}; } /// \brief Get next index within a given range @@ -281,8 +283,8 @@ class GEOMETRY_PUBLIC Config : public autoware::common::helper_functions::crtp= query_idx) ? (ref_idx - query_idx) : (query_idx - ref_idx); - float32_t dist = static_cast(idist) - 1.0F; + const Index i_dist = (ref_idx >= query_idx) ? (ref_idx - query_idx) : (query_idx - ref_idx); + float32_t dist = static_cast(i_dist) - 1.0F; return std::max(dist, 0.0F); } @@ -302,8 +304,8 @@ class GEOMETRY_PUBLIC Config : public autoware::common::helper_functions::crtp(max); const float64_t dmin = static_cast(min); const float64_t width = (dmax - dmin) * static_cast(m_side_length_inv); - constexpr float64_t fltmax = static_cast(std::numeric_limits::max()); - if (fltmax <= width) { + constexpr float64_t flt_max = static_cast(std::numeric_limits::max()); + if (flt_max <= width) { throw std::domain_error("SpatialHash::Config: voxel size approaching floating point limit"); } return static_cast(width); diff --git a/common/autoware_auto_geometry/src/bounding_box.cpp b/common/autoware_auto_geometry/src/bounding_box.cpp index dd0ea45198878..225ea099e4e79 100644 --- a/common/autoware_auto_geometry/src/bounding_box.cpp +++ b/common/autoware_auto_geometry/src/bounding_box.cpp @@ -17,7 +17,9 @@ #include #include #include +// cspell: ignore eigenbox #include +// cspell: ignore lfit #include #include @@ -134,7 +136,7 @@ std::vector GEOMETRY_PUBLIC get_transformed_corners } // namespace details /////////////////////////////////////////////////////////////////////////////// -// precompilation +// pre-compilation using autoware::common::types::PointXYZIF; template BoundingBox minimum_area_bounding_box(std::list & list); template BoundingBox minimum_perimeter_bounding_box(std::list & list); diff --git a/common/autoware_auto_geometry/test/include/test_bounding_box.hpp b/common/autoware_auto_geometry/test/include/test_bounding_box.hpp index b1db855f59774..84fa359295613 100644 --- a/common/autoware_auto_geometry/test/include/test_bounding_box.hpp +++ b/common/autoware_auto_geometry/test/include/test_bounding_box.hpp @@ -18,6 +18,7 @@ #define TEST_BOUNDING_BOX_HPP_ #include "geometry/bounding_box/lfit.hpp" +// cspell: ignore lfit #include "geometry/bounding_box/rotating_calipers.hpp" #include @@ -52,6 +53,8 @@ class BoxTest : public ::testing::Test box = autoware::common::geometry::bounding_box::minimum_perimeter_bounding_box(points); // apex_test_tools::memory_test::stop(); } + + // cspell: ignore eigenbox template void eigenbox(const IT begin, const IT end) { @@ -128,7 +131,7 @@ using PointTypesBoundingBox = TYPED_TEST_SUITE(BoxTest, PointTypesBoundingBox, ); /// NOTE: This is the older version due to 1.8.0 of GTest. v1.8.1 uses TYPED_TEST_SUITE -// TODO(c.ho) consider typed and paremterized tests: +// TODO(c.ho) consider typed and parameterized tests: // https://stackoverflow.com/questions/3258230/passing-a-typename-and-string-to-parameterized-test-using-google-test /////////////////////////////////////////// diff --git a/common/autoware_auto_geometry/test/src/lookup_table.cpp b/common/autoware_auto_geometry/test/src/lookup_table.cpp index d9647a212bd61..e7533518d7f49 100644 --- a/common/autoware_auto_geometry/test/src/lookup_table.cpp +++ b/common/autoware_auto_geometry/test/src/lookup_table.cpp @@ -107,7 +107,7 @@ TYPED_TEST(SanityCheck, Exact) TYPED_TEST(SanityCheck, Interpolation) { const auto x = TypeParam{2}; - // Asssert x is not identically in domain_ + // Assert x is not identically in domain_ ASSERT_TRUE(this->not_in_domain(x)); const auto result = this->table_->lookup(x); this->check(result, TypeParam{3}); diff --git a/common/autoware_auto_geometry/test/src/test_area.cpp b/common/autoware_auto_geometry/test/src/test_area.cpp index 914f711ef8a7b..6710546fa73e9 100644 --- a/common/autoware_auto_geometry/test/src/test_area.cpp +++ b/common/autoware_auto_geometry/test/src/test_area.cpp @@ -79,7 +79,7 @@ TYPED_TEST(AreaTest, Triangle) EXPECT_FLOAT_EQ(2.0, this->area()); // A = (1/2) * b * h } -// Rectangle is easy to do computationall +// Rectangle is easy to do computational TYPED_TEST(AreaTest, Rectangle) { this->add_point(-5.0, -5.0); diff --git a/common/autoware_auto_geometry/test/src/test_common_2d.cpp b/common/autoware_auto_geometry/test/src/test_common_2d.cpp index e53c38d8b4335..642e396bdce31 100644 --- a/common/autoware_auto_geometry/test/src/test_common_2d.cpp +++ b/common/autoware_auto_geometry/test/src/test_common_2d.cpp @@ -188,7 +188,7 @@ TEST(ordered_check, basic) make_points(2.0, 1.0)}; EXPECT_FALSE(autoware::common::geometry::all_ordered(points_list.begin(), points_list.end())); - // Colinearity + // Collinearity points_list = { make_points(2.0, 2.0), make_points(4.0, 4.0), diff --git a/common/grid_map_utils/test/test_polygon_iterator.cpp b/common/grid_map_utils/test/test_polygon_iterator.cpp index 71a7e1db8d4f6..f39d080d7cad5 100644 --- a/common/grid_map_utils/test/test_polygon_iterator.cpp +++ b/common/grid_map_utils/test/test_polygon_iterator.cpp @@ -208,7 +208,7 @@ TEST(PolygonIterator, Difference) GridMap map({"layer"}); map.setGeometry(Length(5.0, 5.0), 1.0, Position(0.0, 0.0)); // bufferSize(8, 5) - // Triangle where the hypothenus is an exact diagonal of the map: difference. + // Triangle where the hypotenuse is an exact diagonal of the map: difference. Polygon polygon; polygon.addVertex(Position(2.5, 2.5)); polygon.addVertex(Position(-2.5, 2.5)); @@ -226,7 +226,7 @@ TEST(PolygonIterator, Difference) } EXPECT_TRUE(diff); - // Triangle where the hypothenus does not cross any cell center: no difference. + // Triangle where the hypotenuse does not cross any cell center: no difference. polygon.removeVertices(); polygon.addVertex(Position(2.5, 2.1)); polygon.addVertex(Position(-2.5, 2.5)); diff --git a/common/interpolation/src/spline_interpolation_points_2d.cpp b/common/interpolation/src/spline_interpolation_points_2d.cpp index 848d65dfae575..61c60df7a8984 100644 --- a/common/interpolation/src/spline_interpolation_points_2d.cpp +++ b/common/interpolation/src/spline_interpolation_points_2d.cpp @@ -59,7 +59,7 @@ std::array, 4> getBaseValues( // calculate base_keys, base_values if (base_x.size() < 2 || base_y.size() < 2 || base_z.size() < 2) { - throw std::logic_error("The numbef of unique points is not enough."); + throw std::logic_error("The number of unique points is not enough."); } const std::vector base_s = calcEuclidDist(base_x, base_y); diff --git a/common/signal_processing/documentation/ButterworthFilter.md b/common/signal_processing/documentation/ButterworthFilter.md index e29ce1f4cfb69..2eac82da83bac 100644 --- a/common/signal_processing/documentation/ButterworthFilter.md +++ b/common/signal_processing/documentation/ButterworthFilter.md @@ -118,6 +118,8 @@ At this step, we define a boolean variable whether to use the pre-warping option **References:** + + 1. Manolakis, Dimitris G., and Vinay K. Ingle. Applied digital signal processing: theory and practice. Cambridge University Press, 2011. diff --git a/common/signal_processing/src/butterworth.cpp b/common/signal_processing/src/butterworth.cpp index 3b4263461e9f6..88a8b6c194601 100644 --- a/common/signal_processing/src/butterworth.cpp +++ b/common/signal_processing/src/butterworth.cpp @@ -190,6 +190,7 @@ void ButterworthFilter::printContinuousTimeTF() const RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "[%s]", tf_text.c_str()); } +// cspell: ignore dend /** * @brief This method assumes the continuous time transfer function of filter has already been * computed and stored in the object and uses the bilinear transformation to obtain the discrete diff --git a/common/tensorrt_common/src/tensorrt_common.cpp b/common/tensorrt_common/src/tensorrt_common.cpp index 50028f51332e6..0b9ea27004cb1 100644 --- a/common/tensorrt_common/src/tensorrt_common.cpp +++ b/common/tensorrt_common/src/tensorrt_common.cpp @@ -39,6 +39,7 @@ TrtCommon::TrtCommon( { for (const auto & plugin_path : plugin_paths) { int32_t flags{RTLD_LAZY}; +// cspell: ignore asan #if ENABLE_ASAN // https://github.com/google/sanitizers/issues/89 // asan doesn't handle module unloading correctly and there are no plans on doing diff --git a/control/control_performance_analysis/README.md b/control/control_performance_analysis/README.md index 123b5976271cf..1fa87c2caf3a9 100644 --- a/control/control_performance_analysis/README.md +++ b/control/control_performance_analysis/README.md @@ -11,7 +11,9 @@ Based on the various input from planning, control, and vehicle, it publishes the All results in `ErrorStamped` message are calculated in Frenet Frame of curve. Errors and velocity errors are calculated by using paper below. -`Werling, Moritz & Groell, Lutz & Bretthauer, Georg. (2010). Invariant Trajectory Tracking With a Full-Size Autonomous Road Vehicle. Robotics, IEEE Transactions on. 26. 758 - 765. 10.1109/TRO.2010.2052325.` + + +`Werling, Moritz & Groell, Lutz & Bretthauer, Georg. (2010). Invariant Trajectory Tracking With a Full-Size Autonomous Road Vehicle. IEEE Transactions on Robotics. 26. 758 - 765. 10.1109/TRO.2010.2052325.` If you are interested in calculations, you can see the error and error velocity calculations in section `C. Asymptotical Trajectory Tracking With Orientation Control`. diff --git a/control/control_performance_analysis/config/controller_monitor.xml b/control/control_performance_analysis/config/controller_monitor.xml index e1a3bbc2bce80..c5189ccec4110 100644 --- a/control/control_performance_analysis/config/controller_monitor.xml +++ b/control/control_performance_analysis/config/controller_monitor.xml @@ -401,7 +401,7 @@ - + diff --git a/control/control_performance_analysis/src/control_performance_analysis_utils.cpp b/control/control_performance_analysis/src/control_performance_analysis_utils.cpp index ce11e10700487..423c71fb286fc 100644 --- a/control/control_performance_analysis/src/control_performance_analysis_utils.cpp +++ b/control/control_performance_analysis/src/control_performance_analysis_utils.cpp @@ -40,11 +40,11 @@ double curvatureFromThreePoints( { double area = triangleArea(a, b, c); - double amag = std::hypot(a[0] - b[0], a[1] - b[1]); // magnitude of triangle edges - double bmag = std::hypot(b[0] - c[0], b[1] - c[1]); - double cmag = std::hypot(c[0] - a[0], c[1] - a[1]); + double a_mag = std::hypot(a[0] - b[0], a[1] - b[1]); // magnitude of triangle edges + double b_mag = std::hypot(b[0] - c[0], b[1] - c[1]); + double c_mag = std::hypot(c[0] - a[0], c[1] - a[1]); - double curvature = 4 * area / std::max(amag * bmag * cmag, 1e-4); + double curvature = 4 * area / std::max(a_mag * b_mag * c_mag, 1e-4); return curvature; } diff --git a/control/mpc_lateral_controller/README.md b/control/mpc_lateral_controller/README.md index 7596f753c5edc..efd6480e214e1 100644 --- a/control/mpc_lateral_controller/README.md +++ b/control/mpc_lateral_controller/README.md @@ -31,6 +31,8 @@ Different vehicle models are implemented: For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented: + + - unconstraint_fast : use least square method to solve unconstraint QP with eigen. - [osqp](https://osqp.org/): run the [following ADMM](https://web.stanford.edu/~boyd/papers/admm_distr_stats.html) algorithm (for more details see the related papers at the [Citing OSQP](https://web.stanford.edu/~boyd/papers/admm_distr_stats.html) section): diff --git a/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_trajectory.hpp b/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_trajectory.hpp index e9a8e50318757..2e7837dc6bbe1 100644 --- a/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_trajectory.hpp +++ b/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_trajectory.hpp @@ -58,7 +58,7 @@ class MPCTrajectory */ size_t size() const; /** - * @return true if the compensents sizes are all 0 or are inconsistent + * @return true if the components sizes are all 0 or are inconsistent */ inline bool empty() const { return size() == 0; } diff --git a/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_utils.hpp b/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_utils.hpp index b7d35eca6cbe5..d9fce24f4185f 100644 --- a/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_utils.hpp +++ b/control/mpc_lateral_controller/include/mpc_lateral_controller/mpc_utils.hpp @@ -84,7 +84,7 @@ bool convertToAutowareTrajectory( /** * @brief calculate the arc length at each point of the given trajectory * @param [in] trajectory trajectory for which to calculate the arc length - * @param [out] arclength the cummulative arc length at each point of the trajectory + * @param [out] arclength the cumulative arc length at each point of the trajectory */ void calcMPCTrajectoryArclength(const MPCTrajectory & trajectory, std::vector * arclength); /** diff --git a/control/mpc_lateral_controller/include/mpc_lateral_controller/qp_solver/qp_solver_interface.hpp b/control/mpc_lateral_controller/include/mpc_lateral_controller/qp_solver/qp_solver_interface.hpp index cb4f92c0c6774..a189ecc2ea7c8 100644 --- a/control/mpc_lateral_controller/include/mpc_lateral_controller/qp_solver/qp_solver_interface.hpp +++ b/control/mpc_lateral_controller/include/mpc_lateral_controller/qp_solver/qp_solver_interface.hpp @@ -41,7 +41,7 @@ class QPSolverInterface * @param [in] lb_a parameter matrix for constraint lb_a < a*u < ub_a * @param [in] ub_a parameter matrix for constraint lb_a < a*u < ub_a * @param [out] u optimal variable vector - * @return ture if the problem was solved + * @return true if the problem was solved */ virtual bool solve( const Eigen::MatrixXd & h_mat, const Eigen::MatrixXd & f_vec, const Eigen::MatrixXd & a, diff --git a/control/mpc_lateral_controller/test/test_interpolate.cpp b/control/mpc_lateral_controller/test/test_interpolate.cpp index 97b2d28205ee4..d9be96b0ef419 100644 --- a/control/mpc_lateral_controller/test/test_interpolate.cpp +++ b/control/mpc_lateral_controller/test/test_interpolate.cpp @@ -78,7 +78,7 @@ TEST(TestInterpolate, Failure) ASSERT_FALSE( linearInterpolate({1.0, 2.0, 2.5, 3.0}, {1.0, 2.0, 3.0, 4.0}, {1.0, 3.5}, target_values)); - // Missmatched inputs + // Mismatched inputs ASSERT_FALSE(linearInterpolate({1.0, 2.0, 2.5, 3.0}, {1.0, 2.0, 3.0}, {1.0, 1.5}, target_values)); ASSERT_FALSE(linearInterpolate({1.0, 2.0, 3.0}, {1.0, 2.0, 3.0, 4.0}, {1.0, 1.5}, target_values)); diff --git a/control/pure_pursuit/include/pure_pursuit/util/planning_utils.hpp b/control/pure_pursuit/include/pure_pursuit/util/planning_utils.hpp index 5441eaa200ac2..a5b1e17ed983f 100644 --- a/control/pure_pursuit/include/pure_pursuit/util/planning_utils.hpp +++ b/control/pure_pursuit/include/pure_pursuit/util/planning_utils.hpp @@ -79,6 +79,7 @@ bool isDirectionForward( bool isDirectionForward( const geometry_msgs::msg::Pose & prev, const geometry_msgs::msg::Point & next); +// cspell: ignore pointinpoly // refer from apache's pointinpoly in http://www.visibone.com/inpoly/ template bool isInPolygon(const std::vector & polygon, const T & point) diff --git a/control/trajectory_follower_base/include/trajectory_follower_base/longitudinal_controller_base.hpp b/control/trajectory_follower_base/include/trajectory_follower_base/longitudinal_controller_base.hpp index 2c2fe2199f007..0f9c0d57bb5cd 100644 --- a/control/trajectory_follower_base/include/trajectory_follower_base/longitudinal_controller_base.hpp +++ b/control/trajectory_follower_base/include/trajectory_follower_base/longitudinal_controller_base.hpp @@ -36,8 +36,8 @@ class LongitudinalControllerBase virtual bool isReady(const InputData & input_data) = 0; virtual LongitudinalOutput run(InputData const & input_data) = 0; void sync(LateralSyncData const & lateral_sync_data); - // NOTE: This reset function should be called when the trajectory is replaned by changing ego pose - // or goal pose. + // NOTE: This reset function should be called when the trajectory is replanned by changing ego + // pose or goal pose. void reset(); protected: diff --git a/localization/ekf_localizer/README.md b/localization/ekf_localizer/README.md index f77e9b263a389..bdcc7ac486cd0 100644 --- a/localization/ekf_localizer/README.md +++ b/localization/ekf_localizer/README.md @@ -164,7 +164,7 @@ Increasing the number will improve the smoothness of the estimation, but may hav - `proc_stddev_vx_c` : set to maximum linear acceleration - `proc_stddev_wz_c` : set to maximum angular acceleration -- `proc_stddev_yaw_c` : This parameter describes the correlation between the yaw and yawrate. A large value means the change in yaw does not correlate to the estimated yawrate. If this is set to 0, it means the change in estimated yaw is equal to yawrate. Usually, this should be set to 0. +- `proc_stddev_yaw_c` : This parameter describes the correlation between the yaw and yaw rate. A large value means the change in yaw does not correlate to the estimated yaw rate. If this is set to 0, it means the change in estimated yaw is equal to yaw rate. Usually, this should be set to 0. - `proc_stddev_yaw_bias_c` : This parameter is the standard deviation for the rate of change in yaw bias. In most cases, yaw bias is constant, so it can be very small, but must be non-zero. ## Kalman Filter Model diff --git a/localization/ndt_scan_matcher/README.md b/localization/ndt_scan_matcher/README.md index 7c63785aebcd2..14d3c9e8cca84 100644 --- a/localization/ndt_scan_matcher/README.md +++ b/localization/ndt_scan_matcher/README.md @@ -241,6 +241,8 @@ This is a function that using de-grounded LiDAR scan estimate scan matching scor ### Parameters + + | Name | Type | Description | | ------------------------------------- | ------ | ------------------------------------------------------------------------------------- | | `estimate_scores_for_degrounded_scan` | bool | Flag for using scan matching score based on de-grounded LiDAR scan (FALSE by default) | diff --git a/localization/ndt_scan_matcher/config/ndt_scan_matcher.param.yaml b/localization/ndt_scan_matcher/config/ndt_scan_matcher.param.yaml index 56c5baa347aaa..a5d8142b6616e 100644 --- a/localization/ndt_scan_matcher/config/ndt_scan_matcher.param.yaml +++ b/localization/ndt_scan_matcher/config/ndt_scan_matcher.param.yaml @@ -73,6 +73,7 @@ # Radius of input LiDAR range (used for diagnostics of dynamic map loading) lidar_radius: 100.0 + # cspell: ignore degrounded # A flag for using scan matching score based on de-grounded LiDAR scan estimate_scores_for_degrounded_scan: false diff --git a/localization/ndt_scan_matcher/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp b/localization/ndt_scan_matcher/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp index 1bd7a509a3a7b..7c9dab4c8103b 100644 --- a/localization/ndt_scan_matcher/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp +++ b/localization/ndt_scan_matcher/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp @@ -203,6 +203,7 @@ class NDTScanMatcher : public rclcpp::Node std::unique_ptr pose_init_module_; std::unique_ptr map_update_module_; + // cspell: ignore degrounded bool estimate_scores_for_degrounded_scan_; double z_margin_for_ground_removal_; }; diff --git a/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp b/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp index a9c37d7843a64..32a286a55ef37 100644 --- a/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp +++ b/localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp @@ -77,6 +77,7 @@ bool validate_local_optimal_solution_oscillation( return false; } +// cspell: ignore degrounded NDTScanMatcher::NDTScanMatcher() : Node("ndt_scan_matcher"), tf2_broadcaster_(*this), diff --git a/map/map_tf_generator/test/test_uniform_random.cpp b/map/map_tf_generator/test/test_uniform_random.cpp index 76ee174a34871..455edc2d5dfd2 100644 --- a/map/map_tf_generator/test/test_uniform_random.cpp +++ b/map/map_tf_generator/test/test_uniform_random.cpp @@ -29,7 +29,7 @@ TEST(UniformRandom, UniformRandom) } // checks if the returned values are in range of [min, max) - // note that the minimun range is always zero and the max value is exclusive + // note that the minimum range is always zero and the max value is exclusive { const size_t min_inclusive = 0; const size_t max_exclusive = 4; diff --git a/perception/elevation_map_loader/README.md b/perception/elevation_map_loader/README.md index 7bfdf5729127c..e9288c2f474a1 100644 --- a/perception/elevation_map_loader/README.md +++ b/perception/elevation_map_loader/README.md @@ -103,7 +103,7 @@ See f | Name | Type | Description | Default value | | :--------------------------------------------------------- | :---- | :----------------------------------------------------------------------------- | :------------ | | pcl_grid_map_extraction/outlier_removal/is_remove_outliers | float | Whether to perform statistical outlier removal. | false | -| pcl_grid_map_extraction/outlier_removal/mean_K | float | Number of neighbours to analyze for estimating statistics of a point. | 10 | +| pcl_grid_map_extraction/outlier_removal/mean_K | float | Number of neighbors to analyze for estimating statistics of a point. | 10 | | pcl_grid_map_extraction/outlier_removal/stddev_threshold | float | Number of standard deviations under which points are considered to be inliers. | 1.0 | #### Subsampling parameters diff --git a/perception/ground_segmentation/include/ground_segmentation/gencolors.hpp b/perception/ground_segmentation/include/ground_segmentation/gencolors.hpp index 0adefe0984347..07637b1514b09 100644 --- a/perception/ground_segmentation/include/ground_segmentation/gencolors.hpp +++ b/perception/ground_segmentation/include/ground_segmentation/gencolors.hpp @@ -97,6 +97,8 @@ inline static void downsamplePoints(const Mat & src, Mat & dst, size_t count) dst.at>(0) = src.at>(maxLoc.x); dst.at>(1) = src.at>(maxLoc.y); + // ignore cspell error due to the source from OpenCV + // cspell: ignore actived Dists randu Mat activedDists(0, dists.cols, dists.type()); Mat candidatePointsMask(1, dists.cols, CV_8UC1, Scalar(255)); activedDists.push_back(dists.row(maxLoc.y)); diff --git a/perception/heatmap_visualizer/include/heatmap_visualizer/heatmap_visualizer_node.hpp b/perception/heatmap_visualizer/include/heatmap_visualizer/heatmap_visualizer_node.hpp index 4b11db83ad668..508ce238b51f1 100644 --- a/perception/heatmap_visualizer/include/heatmap_visualizer/heatmap_visualizer_node.hpp +++ b/perception/heatmap_visualizer/include/heatmap_visualizer/heatmap_visualizer_node.hpp @@ -64,7 +64,7 @@ class HeatmapVisualizerNode : public rclcpp::Node float map_length_; float map_resolution_; bool use_confidence_; - std::vector class_names_{"UNKNWON", "CAR", "TRUCK", "BUS", + std::vector class_names_{"UNKNOWN", "CAR", "TRUCK", "BUS", "TRAILER", "BICYCLE", "MOTORBIKE", "PEDESTRIAN"}; bool rename_car_to_truck_and_bus_; diff --git a/perception/image_projection_based_fusion/config/pointpainting.param.yaml b/perception/image_projection_based_fusion/config/pointpainting.param.yaml index 65d2fe5cc849d..700724a817ceb 100755 --- a/perception/image_projection_based_fusion/config/pointpainting.param.yaml +++ b/perception/image_projection_based_fusion/config/pointpainting.param.yaml @@ -1,7 +1,7 @@ /**: ros__parameters: class_names: ["CAR", "PEDESTRIAN", "BICYCLE"] - point_feature_size: 7 # x, y, z, timelag and car, pedestrian, bicycle + point_feature_size: 7 # x, y, z, time-lag and car, pedestrian, bicycle max_voxel_size: 40000 point_cloud_range: [-76.8, -76.8, -3.0, 76.8, 76.8, 5.0] voxel_size: [0.32, 0.32, 8.0] diff --git a/perception/image_projection_based_fusion/docs/pointpainting-fusion.md b/perception/image_projection_based_fusion/docs/pointpainting-fusion.md index 0d5c9a280cca5..b15a7c5fef9de 100644 --- a/perception/image_projection_based_fusion/docs/pointpainting-fusion.md +++ b/perception/image_projection_based_fusion/docs/pointpainting-fusion.md @@ -72,8 +72,12 @@ Example: ## References/External links + + [1] Vora, Sourabh, et al. "PointPainting: Sequential fusion for 3d object detection." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020. + + [2] CVPR'20 Workshop on Scalability in Autonomous Driving] Waymo Open Dataset Challenge: Ding, Zhuangzhuang, et al. "1st Place Solution for Waymo Open Dataset Challenge--3D Detection and Domain Adaptation." arXiv preprint arXiv:2006.15505 (2020). diff --git a/perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp b/perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp index bf704b0a9311d..4b33783653708 100644 --- a/perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp +++ b/perception/image_projection_based_fusion/include/image_projection_based_fusion/fusion_node.hpp @@ -40,6 +40,8 @@ #include #include +// cspell: ignore minx, maxx, miny, maxy, minz, maxz + namespace image_projection_based_fusion { using autoware_auto_perception_msgs::msg::DetectedObject; @@ -109,7 +111,7 @@ class FusionNode : public rclcpp::Node // cache for fusion std::vector is_fused_; - std::pair sub_stdpair_; + std::pair sub_std_pair_; std::vector> roi_stdmap_; std::mutex mutex_; @@ -119,6 +121,7 @@ class FusionNode : public rclcpp::Node // debugger std::shared_ptr debugger_; virtual bool out_of_scope(const ObjType & obj) = 0; + // cspell: ignore minx, maxx, miny, maxy, minz, maxz float filter_scope_minx_; float filter_scope_maxx_; float filter_scope_miny_; diff --git a/perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml b/perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml index 2848a16c33af1..2bf9af331ca45 100644 --- a/perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml +++ b/perception/image_projection_based_fusion/launch/roi_cluster_fusion.launch.xml @@ -26,6 +26,7 @@ + diff --git a/perception/image_projection_based_fusion/src/fusion_node.cpp b/perception/image_projection_based_fusion/src/fusion_node.cpp index 72a36b0afcc6a..656adaac252fc 100644 --- a/perception/image_projection_based_fusion/src/fusion_node.cpp +++ b/perception/image_projection_based_fusion/src/fusion_node.cpp @@ -115,7 +115,8 @@ FusionNode::FusionNode( stop_watch_ptr_->tic("cyclic_time"); stop_watch_ptr_->tic("processing_time"); } - + // cspell: ignore minx, maxx, miny, maxy, minz, maxz + // FIXME: use min_x instead of minx filter_scope_minx_ = declare_parameter("filter_scope_minx", -100); filter_scope_maxx_ = declare_parameter("filter_scope_maxx", 100); filter_scope_miny_ = declare_parameter("filter_scope_miny", -100); @@ -160,7 +161,7 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr input_ int64_t timestamp_nsec = (*output_msg).header.stamp.sec * (int64_t)1e9 + (*output_msg).header.stamp.nanosec; - // if matching rois exist, fuseonsingle + // if matching rois exist, fuseOnSingle for (std::size_t roi_i = 0; roi_i < rois_number_; ++roi_i) { if (camera_info_map_.find(roi_i) == camera_info_map_.end()) { RCLCPP_WARN(this->get_logger(), "no camera info. id is %zu", roi_i); @@ -173,13 +174,13 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr input_ std::list outdate_stamps; for (const auto & [k, v] : roi_stdmap_.at(roi_i)) { - int64_t newstamp = timestamp_nsec + input_offset_ms_.at(roi_i) * (int64_t)1e6; - int64_t interval = abs(int64_t(k) - newstamp); + int64_t new_stamp = timestamp_nsec + input_offset_ms_.at(roi_i) * (int64_t)1e6; + int64_t interval = abs(int64_t(k) - new_stamp); if (interval <= min_interval && interval <= match_threshold_ms_ * (int64_t)1e6) { min_interval = interval; matched_stamp = k; - } else if (int64_t(k) < newstamp && interval > match_threshold_ms_ * (int64_t)1e6) { + } else if (int64_t(k) < new_stamp && interval > match_threshold_ms_ * (int64_t)1e6) { outdate_stamps.push_back(int64_t(k)); } } @@ -189,7 +190,7 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr input_ (roi_stdmap_.at(roi_i)).erase(stamp); } - // fuseonSingle + // fuseOnSingle if (matched_stamp != -1) { if (debugger_) { debugger_->clear(); @@ -232,10 +233,10 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr input_ "debug/processing_time_ms", processing_time_ms); } } else { - if (sub_stdpair_.second != nullptr) { + if (sub_std_pair_.second != nullptr) { timer_->cancel(); - postprocess(*(sub_stdpair_.second)); - publish(*(sub_stdpair_.second)); + postprocess(*(sub_std_pair_.second)); + publish(*(sub_std_pair_.second)); std::fill(is_fused_.begin(), is_fused_.end(), false); // add processing time for debug @@ -249,8 +250,8 @@ void FusionNode::subCallback(const typename Msg::ConstSharedPtr input_ } } - sub_stdpair_.first = int64_t(timestamp_nsec); - sub_stdpair_.second = output_msg; + sub_std_pair_.first = int64_t(timestamp_nsec); + sub_std_pair_.second = output_msg; } } @@ -262,9 +263,9 @@ void FusionNode::roiCallback( (*input_roi_msg).header.stamp.sec * (int64_t)1e9 + (*input_roi_msg).header.stamp.nanosec; // if cached Msg exist, try to match - if (sub_stdpair_.second != nullptr) { - int64_t newstamp = sub_stdpair_.first + input_offset_ms_.at(roi_i) * (int64_t)1e6; - int64_t interval = abs(timestamp_nsec - newstamp); + if (sub_std_pair_.second != nullptr) { + int64_t new_stamp = sub_std_pair_.first + input_offset_ms_.at(roi_i) * (int64_t)1e6; + int64_t interval = abs(timestamp_nsec - new_stamp); if (interval < match_threshold_ms_ * (int64_t)1e6 && is_fused_.at(roi_i) == false) { if (camera_info_map_.find(roi_i) == camera_info_map_.end()) { @@ -277,12 +278,12 @@ void FusionNode::roiCallback( } fuseOnSingleImage( - *(sub_stdpair_.second), roi_i, *input_roi_msg, camera_info_map_.at(roi_i), - *(sub_stdpair_.second)); + *(sub_std_pair_.second), roi_i, *input_roi_msg, camera_info_map_.at(roi_i), + *(sub_std_pair_.second)); is_fused_.at(roi_i) = true; if (debug_publisher_) { - double timestamp_interval_ms = (timestamp_nsec - sub_stdpair_.first) / 1e6; + double timestamp_interval_ms = (timestamp_nsec - sub_std_pair_.first) / 1e6; debug_publisher_->publish( "debug/roi" + std::to_string(roi_i) + "/timestamp_interval_ms", timestamp_interval_ms); debug_publisher_->publish( @@ -292,10 +293,10 @@ void FusionNode::roiCallback( if (std::count(is_fused_.begin(), is_fused_.end(), true) == static_cast(rois_number_)) { timer_->cancel(); - postprocess(*(sub_stdpair_.second)); - publish(*(sub_stdpair_.second)); + postprocess(*(sub_std_pair_.second)); + publish(*(sub_std_pair_.second)); std::fill(is_fused_.begin(), is_fused_.end(), false); - sub_stdpair_.second = nullptr; + sub_std_pair_.second = nullptr; // add processing time for debug if (debug_publisher_) { @@ -324,12 +325,12 @@ void FusionNode::timer_callback() timer_->cancel(); if (mutex_.try_lock()) { // timeout, postprocess cached msg - if (sub_stdpair_.second != nullptr) { - postprocess(*(sub_stdpair_.second)); - publish(*(sub_stdpair_.second)); + if (sub_std_pair_.second != nullptr) { + postprocess(*(sub_std_pair_.second)); + publish(*(sub_std_pair_.second)); } std::fill(is_fused_.begin(), is_fused_.end(), false); - sub_stdpair_.second = nullptr; + sub_std_pair_.second = nullptr; // add processing time for debug if (debug_publisher_) { diff --git a/perception/image_projection_based_fusion/src/pointpainting_fusion/preprocess_kernel.cu b/perception/image_projection_based_fusion/src/pointpainting_fusion/preprocess_kernel.cu index 678cf8a5febac..de590c5d91984 100644 --- a/perception/image_projection_based_fusion/src/pointpainting_fusion/preprocess_kernel.cu +++ b/perception/image_projection_based_fusion/src/pointpainting_fusion/preprocess_kernel.cu @@ -39,6 +39,7 @@ const std::size_t MAX_POINT_IN_VOXEL_SIZE = 32; // the same as max_point_in_vox const std::size_t WARPS_PER_BLOCK = 4; const std::size_t ENCODER_IN_FEATURE_SIZE = 12; // same as encoder_in_feature_size_ in config.hpp +// cspell: ignore divup std::size_t divup(const std::size_t a, const std::size_t b) { if (a == 0) { diff --git a/perception/image_projection_based_fusion/src/pointpainting_fusion/voxel_generator.cpp b/perception/image_projection_based_fusion/src/pointpainting_fusion/voxel_generator.cpp index 69e9bfd912745..d195f7870fc71 100755 --- a/perception/image_projection_based_fusion/src/pointpainting_fusion/voxel_generator.cpp +++ b/perception/image_projection_based_fusion/src/pointpainting_fusion/voxel_generator.cpp @@ -46,7 +46,7 @@ std::size_t VoxelGenerator::pointsToVoxels( auto pc_msg = pc_cache_iter->pointcloud_msg; auto affine_past2current = pd_ptr_->getAffineWorldToCurrent() * pc_cache_iter->affine_past2world; - float timelag = static_cast( + float time_lag = static_cast( pd_ptr_->getCurrentTimestamp() - rclcpp::Time(pc_msg.header.stamp).seconds()); for (sensor_msgs::PointCloud2ConstIterator x_iter(pc_msg, "x"), y_iter(pc_msg, "y"), @@ -59,7 +59,7 @@ std::size_t VoxelGenerator::pointsToVoxels( point[0] = point_current.x(); point[1] = point_current.y(); point[2] = point_current.z(); - point[3] = timelag; + point[3] = time_lag; point[4] = *car_iter; point[5] = *ped_iter; point[6] = *bic_iter; diff --git a/perception/image_projection_based_fusion/src/roi_cluster_fusion/node.cpp b/perception/image_projection_based_fusion/src/roi_cluster_fusion/node.cpp index 717f21da21fc3..e15d47a01521c 100644 --- a/perception/image_projection_based_fusion/src/roi_cluster_fusion/node.cpp +++ b/perception/image_projection_based_fusion/src/roi_cluster_fusion/node.cpp @@ -28,6 +28,8 @@ #include #endif +// cspell: ignore minx, maxx, miny, maxy, minz, maxz + namespace image_projection_based_fusion { diff --git a/perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp b/perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp index 387dd08bc3c55..3781714d3cf71 100644 --- a/perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp +++ b/perception/image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp @@ -17,6 +17,8 @@ #include #include +// cspell: ignore minx, maxx, miny, maxy, minz, maxz + namespace image_projection_based_fusion { diff --git a/perception/lidar_centerpoint/include/lidar_centerpoint/centerpoint_config.hpp b/perception/lidar_centerpoint/include/lidar_centerpoint/centerpoint_config.hpp index a58a1121fc4a6..363184ecacfa9 100644 --- a/perception/lidar_centerpoint/include/lidar_centerpoint/centerpoint_config.hpp +++ b/perception/lidar_centerpoint/include/lidar_centerpoint/centerpoint_config.hpp @@ -78,7 +78,7 @@ class CenterPointConfig // input params std::size_t class_size_{3}; const std::size_t point_dim_size_{3}; // x, y and z - std::size_t point_feature_size_{4}; // x, y, z and timelag + std::size_t point_feature_size_{4}; // x, y, z and time-lag std::size_t max_point_in_voxel_size_{32}; std::size_t max_voxel_size_{40000}; float range_min_x_{-89.6f}; diff --git a/perception/lidar_centerpoint/include/lidar_centerpoint/utils.hpp b/perception/lidar_centerpoint/include/lidar_centerpoint/utils.hpp index 36849479a87ea..84462bc9657ac 100644 --- a/perception/lidar_centerpoint/include/lidar_centerpoint/utils.hpp +++ b/perception/lidar_centerpoint/include/lidar_centerpoint/utils.hpp @@ -35,6 +35,7 @@ struct Box3D float vel_y; }; +// cspell: ignore divup std::size_t divup(const std::size_t a, const std::size_t b); } // namespace centerpoint diff --git a/perception/lidar_centerpoint/launch/centerpoint_vs_centerpoint-tiny/README.md b/perception/lidar_centerpoint/launch/centerpoint_vs_centerpoint-tiny/README.md index c78ac8d235b5d..69ef70be265ec 100644 --- a/perception/lidar_centerpoint/launch/centerpoint_vs_centerpoint-tiny/README.md +++ b/perception/lidar_centerpoint/launch/centerpoint_vs_centerpoint-tiny/README.md @@ -40,7 +40,7 @@ source install/setup.bash ros2 bag play /YOUR/ROSBAG/PATH/ --clock 100 ``` -Don't forget to add `clock` inorder to sync between two rviz display. +Don't forget to add `clock` in order to sync between two rviz display. You can also use the sample rosbag provided by autoware [here](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/rosbag-replay-simulation/). diff --git a/perception/lidar_centerpoint/lib/network/scatter_kernel.cu b/perception/lidar_centerpoint/lib/network/scatter_kernel.cu index cba72c2c37841..da2f0e2f57c15 100644 --- a/perception/lidar_centerpoint/lib/network/scatter_kernel.cu +++ b/perception/lidar_centerpoint/lib/network/scatter_kernel.cu @@ -48,6 +48,7 @@ __global__ void scatterFeatures_kernel( feature; } +// cspell: ignore divup cudaError_t scatterFeatures_launch( const float * pillar_features, const int * coords, const std::size_t num_pillars, const std::size_t max_voxel_size, const std::size_t encoder_out_feature_size, diff --git a/perception/lidar_centerpoint/lib/postprocess/circle_nms_kernel.cu b/perception/lidar_centerpoint/lib/postprocess/circle_nms_kernel.cu index 902c27fe8add1..398e75a55c44b 100644 --- a/perception/lidar_centerpoint/lib/postprocess/circle_nms_kernel.cu +++ b/perception/lidar_centerpoint/lib/postprocess/circle_nms_kernel.cu @@ -41,6 +41,7 @@ __device__ inline float dist2dPow(const Box3D * a, const Box3D * b) return powf(a->x - b->x, 2) + powf(a->y - b->y, 2); } +// cspell: ignore divup __global__ void circleNMS_Kernel( const Box3D * boxes, const std::size_t num_boxes3d, const std::size_t col_blocks, const float dist2d_pow_threshold, std::uint64_t * mask) diff --git a/perception/lidar_centerpoint/lib/postprocess/postprocess_kernel.cu b/perception/lidar_centerpoint/lib/postprocess/postprocess_kernel.cu index 8942bdd33ceb5..765f678784574 100644 --- a/perception/lidar_centerpoint/lib/postprocess/postprocess_kernel.cu +++ b/perception/lidar_centerpoint/lib/postprocess/postprocess_kernel.cu @@ -114,6 +114,7 @@ PostProcessCUDA::PostProcessCUDA(const CenterPointConfig & config) : config_(con config_.yaw_norm_thresholds_.begin(), config_.yaw_norm_thresholds_.end()); } +// cspell: ignore divup cudaError_t PostProcessCUDA::generateDetectedBoxes3D_launch( const float * out_heatmap, const float * out_offset, const float * out_z, const float * out_dim, const float * out_rot, const float * out_vel, std::vector & det_boxes3d, @@ -130,7 +131,7 @@ cudaError_t PostProcessCUDA::generateDetectedBoxes3D_launch( thrust::raw_pointer_cast(yaw_norm_thresholds_d_.data()), thrust::raw_pointer_cast(boxes3d_d_.data())); - // suppress by socre + // suppress by score const auto num_det_boxes3d = thrust::count_if( thrust::device, boxes3d_d_.begin(), boxes3d_d_.end(), is_score_greater(config_.score_threshold_)); diff --git a/perception/lidar_centerpoint/lib/preprocess/preprocess_kernel.cu b/perception/lidar_centerpoint/lib/preprocess/preprocess_kernel.cu index b647a75504180..7b59757311ff2 100644 --- a/perception/lidar_centerpoint/lib/preprocess/preprocess_kernel.cu +++ b/perception/lidar_centerpoint/lib/preprocess/preprocess_kernel.cu @@ -141,6 +141,7 @@ __global__ void generateFeatures_kernel( } } +// cspell: ignore divup cudaError_t generateFeatures_launch( const float * voxel_features, const float * voxel_num_points, const int * coords, const std::size_t num_voxels, const std::size_t max_voxel_size, const float voxel_size_x, diff --git a/perception/lidar_centerpoint/lib/preprocess/voxel_generator.cpp b/perception/lidar_centerpoint/lib/preprocess/voxel_generator.cpp index 8f9be13d5cd45..7f4e4a849211c 100644 --- a/perception/lidar_centerpoint/lib/preprocess/voxel_generator.cpp +++ b/perception/lidar_centerpoint/lib/preprocess/voxel_generator.cpp @@ -71,7 +71,7 @@ std::size_t VoxelGenerator::pointsToVoxels( pd_ptr_->pointcloud_cache_size() > 1 ? pd_ptr_->getAffineWorldToCurrent() * pc_cache_iter->affine_past2world : Eigen::Affine3f::Identity(); - float timelag = static_cast( + float time_lag = static_cast( pd_ptr_->getCurrentTimestamp() - rclcpp::Time(pc_msg.header.stamp).seconds()); for (sensor_msgs::PointCloud2ConstIterator x_iter(pc_msg, "x"), y_iter(pc_msg, "y"), @@ -83,7 +83,7 @@ std::size_t VoxelGenerator::pointsToVoxels( point[0] = point_current.x(); point[1] = point_current.y(); point[2] = point_current.z(); - point[3] = timelag; + point[3] = time_lag; out_of_range = false; for (std::size_t di = 0; di < config_.point_dim_size_; di++) { diff --git a/perception/lidar_centerpoint/lib/utils.cpp b/perception/lidar_centerpoint/lib/utils.cpp index 75508eb32af20..b6e0a54ab6de9 100644 --- a/perception/lidar_centerpoint/lib/utils.cpp +++ b/perception/lidar_centerpoint/lib/utils.cpp @@ -18,6 +18,7 @@ namespace centerpoint { +// cspell: ignore divup std::size_t divup(const std::size_t a, const std::size_t b) { if (a == 0) { diff --git a/perception/lidar_centerpoint_tvm/include/lidar_centerpoint_tvm/utils.hpp b/perception/lidar_centerpoint_tvm/include/lidar_centerpoint_tvm/utils.hpp index 7ff2c6eb612b0..259deef53f189 100644 --- a/perception/lidar_centerpoint_tvm/include/lidar_centerpoint_tvm/utils.hpp +++ b/perception/lidar_centerpoint_tvm/include/lidar_centerpoint_tvm/utils.hpp @@ -40,6 +40,7 @@ struct Box3D float vel_y; }; +// cspell: ignore divup std::size_t divup(const std::size_t a, const std::size_t b); } // namespace lidar_centerpoint_tvm diff --git a/perception/lidar_centerpoint_tvm/lib/postprocess/generate_detected_boxes.cpp b/perception/lidar_centerpoint_tvm/lib/postprocess/generate_detected_boxes.cpp index 93563555e03d5..405223c800eba 100644 --- a/perception/lidar_centerpoint_tvm/lib/postprocess/generate_detected_boxes.cpp +++ b/perception/lidar_centerpoint_tvm/lib/postprocess/generate_detected_boxes.cpp @@ -114,6 +114,7 @@ void generateBoxes3D_worker( } } +// cspell: ignore divup void generateDetectedBoxes3D( const std::vector & out_heatmap, const std::vector & out_offset, const std::vector & out_z, const std::vector & out_dim, @@ -135,7 +136,7 @@ void generateDetectedBoxes3D( threadPool[idx].join(); } - // suppress by socre + // suppress by score const auto num_det_boxes3d = std::count_if(boxes3d.begin(), boxes3d.end(), is_score_greater(config.score_threshold_)); if (num_det_boxes3d == 0) { @@ -150,17 +151,17 @@ void generateDetectedBoxes3D( // sort by score std::sort(det_boxes3d_nonms.begin(), det_boxes3d_nonms.end(), score_greater()); - // supress by NMS + // suppress by NMS std::vector final_keep_mask(num_det_boxes3d); const auto num_final_det_boxes3d = circleNMS(det_boxes3d_nonms, config.circle_nms_dist_threshold_, final_keep_mask); det_boxes3d.resize(num_final_det_boxes3d); - std::size_t boxid = 0; + std::size_t box_id = 0; for (std::size_t idx = 0; idx < final_keep_mask.size(); idx++) { if (final_keep_mask[idx]) { - det_boxes3d[boxid] = det_boxes3d_nonms[idx]; - boxid++; + det_boxes3d[box_id] = det_boxes3d_nonms[idx]; + box_id++; } } // std::copy_if(det_boxes3d_nonms.begin(), det_boxes3d_nonms.end(), final_keep_mask.begin(), diff --git a/perception/lidar_centerpoint_tvm/lib/preprocess/generate_features.cpp b/perception/lidar_centerpoint_tvm/lib/preprocess/generate_features.cpp index c095ff7311eb6..9b98adc2def4e 100644 --- a/perception/lidar_centerpoint_tvm/lib/preprocess/generate_features.cpp +++ b/perception/lidar_centerpoint_tvm/lib/preprocess/generate_features.cpp @@ -52,7 +52,7 @@ void generateFeatures_worker( pillar_idx * config.max_point_in_voxel_size_ * config.point_feature_size_ + i * config.point_feature_size_; for (std::size_t j = 0; j < config.point_feature_size_; j++) { - // point (x, y, z, instensity) + // point (x, y, z, intensity) if (i < points_count && j < 3) points_sum[j] += voxel_features[point_idx + j]; } } @@ -104,6 +104,7 @@ void generateFeatures_worker( } } +// cspell: ignore divup void generateFeatures( const std::vector & voxel_features, const std::vector & voxel_num_points, const std::vector & coords, const std::size_t num_voxels, diff --git a/perception/lidar_centerpoint_tvm/lib/utils.cpp b/perception/lidar_centerpoint_tvm/lib/utils.cpp index 146c47f05570c..caf9cb84fa1c7 100644 --- a/perception/lidar_centerpoint_tvm/lib/utils.cpp +++ b/perception/lidar_centerpoint_tvm/lib/utils.cpp @@ -23,6 +23,7 @@ namespace perception namespace lidar_centerpoint_tvm { +// cspell: ignore divup std::size_t divup(const std::size_t a, const std::size_t b) { if (a == 0) { diff --git a/perception/map_based_prediction/README.md b/perception/map_based_prediction/README.md index 20d76b3841f6d..043103e9c39d7 100644 --- a/perception/map_based_prediction/README.md +++ b/perception/map_based_prediction/README.md @@ -42,7 +42,7 @@ Search one or more lanelets satisfying the following conditions for each target - Create a reference path for the object from the associated lanelet. - Predict Object Maneuver - Generate predicted paths for the object. - - The probability is assigned to each maneuver of `Lane Follow`, `Left Lane Change`, and `Right Lane Chagne` based on the object history and the reference path obtained in the first step. + - The probability is assigned to each maneuver of `Lane Follow`, `Left Lane Change`, and `Right Lane Change` based on the object history and the reference path obtained in the first step. - The following information is used to determine the maneuver. - The distance between the current center of gravity of the object and the left and right boundaries of the lane - The lateral velocity (distance moved to the lateral direction in `t` seconds) diff --git a/perception/multi_object_tracker/include/multi_object_tracker/utils/utils.hpp b/perception/multi_object_tracker/include/multi_object_tracker/utils/utils.hpp index 7544a204d3e8e..bc97c9ba92d7e 100644 --- a/perception/multi_object_tracker/include/multi_object_tracker/utils/utils.hpp +++ b/perception/multi_object_tracker/include/multi_object_tracker/utils/utils.hpp @@ -330,7 +330,7 @@ inline void convertConvexHullToBoundingBox( const Eigen::Vector2d new_local_center{(max_x + min_x) / 2.0, (max_y + min_y) / 2.0}; const Eigen::Vector2d new_center = center + Rinv.transpose() * new_local_center; - // set output paramters + // set output parameters output_object = input_object; output_object.kinematics.pose_with_covariance.pose.position.x = new_center.x(); output_object.kinematics.pose_with_covariance.pose.position.y = new_center.y(); diff --git a/perception/radar_fusion_to_detected_object/docs/radar_fusion_to_detected_object_5.drawio.svg b/perception/radar_fusion_to_detected_object/docs/radar_fusion_to_detected_object_5.drawio.svg index f6714b4904813..b253222c7b311 100644 --- a/perception/radar_fusion_to_detected_object/docs/radar_fusion_to_detected_object_5.drawio.svg +++ b/perception/radar_fusion_to_detected_object/docs/radar_fusion_to_detected_object_5.drawio.svg @@ -187,7 +187,7 @@
- Delete obejct + Delete object
@@ -195,7 +195,7 @@
- Delete obejct + Delete object diff --git a/perception/tensorrt_yolox/README.md b/perception/tensorrt_yolox/README.md index aaf51198e4429..390d5a2198cb3 100644 --- a/perception/tensorrt_yolox/README.md +++ b/perception/tensorrt_yolox/README.md @@ -8,6 +8,8 @@ This package detects target objects e.g., cars, trucks, bicycles, and pedestrian ### Cite + + Zheng Ge, Songtao Liu, Feng Wang, Zeming Li, Jian Sun, "YOLOX: Exceeding YOLO Series in 2021", arXiv preprint arXiv:2107.08430, 2021 [[ref](https://arxiv.org/abs/2107.08430)] ## Inputs / Outputs diff --git a/perception/tensorrt_yolox/include/tensorrt_yolox/tensorrt_yolox.hpp b/perception/tensorrt_yolox/include/tensorrt_yolox/tensorrt_yolox.hpp index 7f0f64dc89f67..8ee0c8e1ed59e 100644 --- a/perception/tensorrt_yolox/include/tensorrt_yolox/tensorrt_yolox.hpp +++ b/perception/tensorrt_yolox/include/tensorrt_yolox/tensorrt_yolox.hpp @@ -74,7 +74,7 @@ class TrtYoloX void generateYoloxProposals( std::vector grid_strides, float * feat_blob, float prob_threshold, ObjectArray & objects) const; - void qsortDescentInplace(ObjectArray & faceobjects, int left, int right) const; + void qsortDescentInplace(ObjectArray & face_objects, int left, int right) const; inline void qsortDescentInplace(ObjectArray & objects) const { if (objects.empty()) { @@ -89,8 +89,9 @@ class TrtYoloX cv::Rect_ inter = a_rect & b_rect; return inter.area(); } + // cspell: ignore Bboxes void nmsSortedBboxes( - const ObjectArray & faceobjects, std::vector & picked, float nms_threshold) const; + const ObjectArray & face_objects, std::vector & picked, float nms_threshold) const; std::unique_ptr trt_common_; diff --git a/perception/tensorrt_yolox/src/tensorrt_yolox.cpp b/perception/tensorrt_yolox/src/tensorrt_yolox.cpp index 191a3832d028d..e940679c9c58d 100644 --- a/perception/tensorrt_yolox/src/tensorrt_yolox.cpp +++ b/perception/tensorrt_yolox/src/tensorrt_yolox.cpp @@ -61,7 +61,7 @@ TrtYoloX::TrtYoloX( break; default: std::stringstream s; - s << "\"" << model_path << "\" is unsuppoerted format"; + s << "\"" << model_path << "\" is unsupported format"; std::runtime_error{s.str()}; } @@ -227,6 +227,7 @@ void TrtYoloX::decodeOutputs( qsortDescentInplace(proposals); std::vector picked; + // cspell: ignore Bboxes nmsSortedBboxes(proposals, picked, nms_threshold_); int count = static_cast(picked.size()); @@ -310,24 +311,24 @@ void TrtYoloX::generateYoloxProposals( } // point anchor loop } -void TrtYoloX::qsortDescentInplace(ObjectArray & faceobjects, int left, int right) const +void TrtYoloX::qsortDescentInplace(ObjectArray & face_objects, int left, int right) const { int i = left; int j = right; - float p = faceobjects[(left + right) / 2].score; + float p = face_objects[(left + right) / 2].score; while (i <= j) { - while (faceobjects[i].score > p) { + while (face_objects[i].score > p) { i++; } - while (faceobjects[j].score < p) { + while (face_objects[j].score < p) { j--; } if (i <= j) { // swap - std::swap(faceobjects[i], faceobjects[j]); + std::swap(face_objects[i], face_objects[j]); i++; j--; @@ -339,38 +340,38 @@ void TrtYoloX::qsortDescentInplace(ObjectArray & faceobjects, int left, int righ #pragma omp section { if (left < j) { - qsortDescentInplace(faceobjects, left, j); + qsortDescentInplace(face_objects, left, j); } } #pragma omp section { if (i < right) { - qsortDescentInplace(faceobjects, i, right); + qsortDescentInplace(face_objects, i, right); } } } } void TrtYoloX::nmsSortedBboxes( - const ObjectArray & faceobjects, std::vector & picked, float nms_threshold) const + const ObjectArray & face_objects, std::vector & picked, float nms_threshold) const { picked.clear(); - const int n = faceobjects.size(); + const int n = face_objects.size(); std::vector areas(n); for (int i = 0; i < n; i++) { cv::Rect rect( - faceobjects[i].x_offset, faceobjects[i].y_offset, faceobjects[i].width, - faceobjects[i].height); + face_objects[i].x_offset, face_objects[i].y_offset, face_objects[i].width, + face_objects[i].height); areas[i] = rect.area(); } for (int i = 0; i < n; i++) { - const Object & a = faceobjects[i]; + const Object & a = face_objects[i]; int keep = 1; for (int j = 0; j < static_cast(picked.size()); j++) { - const Object & b = faceobjects[picked[j]]; + const Object & b = face_objects[picked[j]]; // intersection over union float inter_area = intersectionArea(a, b); diff --git a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp index 527bb50c5dabf..848aaf8c8d38c 100644 --- a/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp +++ b/planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp @@ -2568,7 +2568,7 @@ ObjectDataArray AvoidanceModule::getAdjacentLaneObjects( // TODO(murooka) judge when and which way to extend drivable area. current implementation is keep // extending during avoidance module -// TODO(murooka) freespace during turning in intersection where there is no neighbour lanes +// TODO(murooka) freespace during turning in intersection where there is no neighbor lanes // NOTE: Assume that there is no situation where there is an object in the middle lane of more than // two lanes since which way to avoid is not obvious void AvoidanceModule::generateExtendedDrivableArea(PathWithLaneId & path) const @@ -2642,7 +2642,7 @@ void AvoidanceModule::generateExtendedDrivableArea(PathWithLaneId & path) const const auto next_lanes_for_left = get_next_lanes_from_same_previous_lane(current_drivable_lanes.left_lane); - // 2.2 look for neighbour lane recursively, where end line of the lane is connected to end line + // 2.2 look for neighbor lane recursively, where end line of the lane is connected to end line // of the original lane const auto update_drivable_lanes = [&](const lanelet::ConstLanelets & next_lanes, const bool is_left) { diff --git a/planning/behavior_velocity_planner/crosswalk-design.md b/planning/behavior_velocity_planner/crosswalk-design.md index 4897737b98c0c..19fa4a5ec5da1 100644 --- a/planning/behavior_velocity_planner/crosswalk-design.md +++ b/planning/behavior_velocity_planner/crosswalk-design.md @@ -175,7 +175,7 @@ This module uses the larger value of estimated object velocity and `min_object_v ```plantuml start -if (Pedestrain's traffic light signal is **RED**?) then (yes) +if (Pedestrian's traffic light signal is **RED**?) then (yes) else (no) if (There are objects around the crosswalk?) then (yes) :calculate TTC & TTV; diff --git a/planning/behavior_velocity_planner/docs/crosswalk/limitation.svg b/planning/behavior_velocity_planner/docs/crosswalk/limitation.svg index b959328e63330..3e507c0669a2b 100644 --- a/planning/behavior_velocity_planner/docs/crosswalk/limitation.svg +++ b/planning/behavior_velocity_planner/docs/crosswalk/limitation.svg @@ -142,12 +142,12 @@
- The pedestrain has no intention to cross via this route. + The pedestrian has no intention to cross via this route.
- The pedestrain has no intent... + The pedestrian has no intent... diff --git a/planning/freespace_planner/README.md b/planning/freespace_planner/README.md index df834305519eb..b40f2681dce51 100644 --- a/planning/freespace_planner/README.md +++ b/planning/freespace_planner/README.md @@ -79,12 +79,14 @@ None #### RRT\* search parameters + + | Parameter | Type | Description | | ----------------------- | ------ | ----------------------------------------------------------------------------- | | `max planning time` | double | maximum planning time [msec] (used only when `enable_update` is set `true`) | | `enable_update` | bool | whether update after feasible solution found until `max_planning time` elapse | -| `use_informed_sampling` | bool | Use informed RRT\* (of Gammmell et al.) | -| `neighbour_radius` | double | neighbour radius of RRT\* algorithm | +| `use_informed_sampling` | bool | Use informed RRT\* (of Gammell et al.) | +| `neighbor_radius` | double | neighbor radius of RRT\* algorithm | | `margin` | double | safety margin ensured in path's collision checking in RRT\* algorithm | ### Flowchart diff --git a/planning/freespace_planning_algorithms/README.md b/planning/freespace_planning_algorithms/README.md index ef0c2a3aca384..0084f4c296547 100644 --- a/planning/freespace_planning_algorithms/README.md +++ b/planning/freespace_planning_algorithms/README.md @@ -10,10 +10,12 @@ This package is for development of path planning algorithms in free space. Please see [rrtstar.md](rrtstar.md) for a note on the implementation for informed-RRT\*. + + NOTE: As for RRT\*, one can choose whether update after feasible solution found in RRT\*. If not doing so, the algorithm is the almost (but exactly because of rewiring procedure) same as vanilla RRT. If you choose update, then you have option if the sampling after feasible solution found is "informed". -If set true, then the algorithm is equivalent to `informed RRT\* of Gammmell et al. 2014`. +If set true, then the algorithm is equivalent to `informed RRT\* of Gammell et al. 2014`. ## Algorithm selection diff --git a/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar.hpp b/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar.hpp index 6b3b967760e45..eb091b9066bff 100644 --- a/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar.hpp +++ b/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar.hpp @@ -30,7 +30,7 @@ struct RRTStarParam bool enable_update; // update solution even after feasible solution found with given time budget bool use_informed_sampling; // use informed sampling (informed rrtstar) double max_planning_time; // if enable_update is true, update is done before time elapsed [msec] - double neighbour_radius; // neighbore radius [m] + double neighbor_radius; // neighbor radius [m] double margin; // [m] }; @@ -61,7 +61,7 @@ class RRTStar : public AbstractPlanningAlgorithm bool hasObstacleOnTrajectory(const geometry_msgs::msg::PoseArray & trajectory) const override; private: - void setRRTPath(const std::vector & waypints); + void setRRTPath(const std::vector & waypoints); // algorithm specific param const RRTStarParam rrtstar_param_; diff --git a/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar_core.hpp b/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar_core.hpp index b0ad43dbf3494..dcaeba804944c 100644 --- a/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar_core.hpp +++ b/planning/freespace_planning_algorithms/include/freespace_planning_algorithms/rrtstar_core.hpp @@ -38,6 +38,7 @@ using Pose = freespace_planning_algorithms::ReedsSheppStateSpace::StateXYT; using ReedsSheppStateSpace = freespace_planning_algorithms::ReedsSheppStateSpace; const double inf = std::numeric_limits::infinity(); +// cspell: ignore rsspace class CSpace { public: @@ -59,7 +60,7 @@ class CSpace // Note that parent-to-child and child-to-parent reeds-shepp paths are sometimes // different, because there may two reeds-shepp paths with an exact same cost given two poses. // For example, say you want to compute a reeds-shepp path from [0, 0, 0] to [0, 1, 0], where - // each element indicate x, y, and yaw. In such a case, you will have symetric two reeds-sheep + // each element indicate x, y, and yaw. In such a case, you will have symmetric two reeds-sheep // paths, one of which starts moving with forward motion and // the other of which with backward motion. // So, due to floating point level difference, the resulting reeds-shepp path can be different. @@ -137,15 +138,15 @@ class RRTStar private: NodeConstSharedPtr findNearestNode(const Pose & x_rand) const; - std::vector findNeighboreNodes(const Pose & pose) const; + std::vector findNeighborNodes(const Pose & pose) const; NodeSharedPtr addNewNode(const Pose & pose, NodeSharedPtr node_parent); NodeConstSharedPtr getBestParentNode( const Pose & pose_new, const NodeConstSharedPtr & node_nearest, - const std::vector & neighbore_nodes) const; + const std::vector & neighbor_nodes) const; void reconnect(const NodeSharedPtr & node_new, const NodeSharedPtr & node_reconnect); NodeConstSharedPtr getReconnectTargeNode( const NodeConstSharedPtr node_new, - const std::vector & neighbore_nodes) const; + const std::vector & neighbor_nodes) const; NodeSharedPtr node_start_; NodeSharedPtr node_goal_; diff --git a/planning/freespace_planning_algorithms/rrtstar.md b/planning/freespace_planning_algorithms/rrtstar.md index d48c065ee9574..8f64fe757bc2f 100644 --- a/planning/freespace_planning_algorithms/rrtstar.md +++ b/planning/freespace_planning_algorithms/rrtstar.md @@ -4,9 +4,11 @@ Let us define $f(x)$ as minimum cost of the path when path is constrained to pass through $x$ (so path will be $x_{\mathrm{start}} \to \mathrm{x} \to \mathrm{x_{\mathrm{goal}}}$). Also, let us define $c_{\mathrm{best}}$ as the current minimum cost of the feasible paths. Let us define a set $ X(f) = \left\{ x \in X | f(x) < c*{\mathrm{best}} \right\} $. If we could sample a new point from $X_f$ instead of $X$ as in vanilla RRT\*, chance that $c*{\mathrm{best}}$ is updated is increased, thus the convergence rate is improved. -In most case, $f(x)$ is unknown, thus it is straightforward to approximiate the function $f$ by a heuristic function $\hat{f}$. A heuristic function is [admissible](https://en.wikipedia.org/wiki/Admissible_heuristic) if $\forall x \in X, \hat{f}(x) < f(x)$, which is sufficient condition of conversion to optimal path. The good heuristic function $\hat{f}$ has two properties: 1) it is an admissible tight lower bound of $f$ and 2) sampling from $X(\hat{f})$ is easy. +In most case, $f(x)$ is unknown, thus it is straightforward to approximate the function $f$ by a heuristic function $\hat{f}$. A heuristic function is [admissible](https://en.wikipedia.org/wiki/Admissible_heuristic) if $\forall x \in X, \hat{f}(x) < f(x)$, which is sufficient condition of conversion to optimal path. The good heuristic function $\hat{f}$ has two properties: 1) it is an admissible tight lower bound of $f$ and 2) sampling from $X(\hat{f})$ is easy. -According to Gammell et al [1], a good heursitic function when path is always straight is $\hat{f}(x) = ||x_{\mathrm{start}} - x|| + ||x - x_{\mathrm{goal}}||$. If we don't assume any obstacle information the heursitic is tightest. Also, $X(\hat{f})$ is hyper-ellipsoid, and hence sampling from it can be done analitically. + + +According to Gammell et al [1], a good heuristic function when path is always straight is $\hat{f}(x) = ||x_{\mathrm{start}} - x|| + ||x - x_{\mathrm{goal}}||$. If we don't assume any obstacle information the heuristic is tightest. Also, $X(\hat{f})$ is hyper-ellipsoid, and hence sampling from it can be done analytically. ### Modification to fit reeds-sheep path case diff --git a/planning/freespace_planning_algorithms/src/rrtstar.cpp b/planning/freespace_planning_algorithms/src/rrtstar.cpp index f03dc81faba05..1607451173f9f 100644 --- a/planning/freespace_planning_algorithms/src/rrtstar.cpp +++ b/planning/freespace_planning_algorithms/src/rrtstar.cpp @@ -17,7 +17,7 @@ namespace { -rrtstar_core::Pose posemsgToPose(const geometry_msgs::msg::Pose & pose_msg) +rrtstar_core::Pose poseMsgToPose(const geometry_msgs::msg::Pose & pose_msg) { return rrtstar_core::Pose{ pose_msg.position.x, pose_msg.position.y, tf2::getYaw(pose_msg.orientation)}; @@ -68,8 +68,8 @@ bool RRTStar::makePlan( M_PI}; const double radius = planner_common_param_.minimum_turning_radius; const auto cspace = rrtstar_core::CSpace(lo, hi, radius, is_obstacle_free); - const auto x_start = posemsgToPose(start_pose_); - const auto x_goal = posemsgToPose(goal_pose_); + const auto x_start = poseMsgToPose(start_pose_); + const auto x_goal = poseMsgToPose(goal_pose_); if (!is_obstacle_free(x_start)) { return false; @@ -82,7 +82,7 @@ bool RRTStar::makePlan( const bool is_informed = rrtstar_param_.use_informed_sampling; // always better const double collision_check_resolution = rrtstar_param_.margin * 2; auto algo = rrtstar_core::RRTStar( - x_start, x_goal, rrtstar_param_.neighbour_radius, collision_check_resolution, is_informed, + x_start, x_goal, rrtstar_param_.neighbor_radius, collision_check_resolution, is_informed, cspace); while (true) { const rclcpp::Time now = rclcpp::Clock(RCL_ROS_TIME).now(); @@ -153,15 +153,15 @@ void RRTStar::setRRTPath(const std::vector & waypoints) if (0 == i) { const auto & pt_now = waypoints.at(i); const auto & pt_next = waypoints.at(i + 1); - const double inpro = + const double inner_product = cos(pt_now.yaw) * (pt_next.x - pt_now.x) + sin(pt_now.yaw) * (pt_next.y - pt_now.y); - pw.is_back = (inpro < 0.0); + pw.is_back = (inner_product < 0.0); } else { const auto & pt_pre = waypoints.at(i - 1); const auto & pt_now = waypoints.at(i); - const double inpro = + const double inner_product = cos(pt_pre.yaw) * (pt_now.x - pt_pre.x) + sin(pt_pre.yaw) * (pt_now.y - pt_pre.y); - pw.is_back = !(inpro > 0.0); + pw.is_back = !(inner_product > 0.0); } pw.pose = pose; waypoints_.waypoints.push_back(pw); diff --git a/planning/freespace_planning_algorithms/src/rrtstar_core.cpp b/planning/freespace_planning_algorithms/src/rrtstar_core.cpp index 5ccf1d0641930..25aa54a4f19ab 100644 --- a/planning/freespace_planning_algorithms/src/rrtstar_core.cpp +++ b/planning/freespace_planning_algorithms/src/rrtstar_core.cpp @@ -24,6 +24,8 @@ #include #include +// cspell: ignore rsspace +// In this case, RSSpace means "Reeds Shepp state Space" namespace rrtstar_core { CSpace::CSpace( @@ -158,13 +160,13 @@ void RRTStar::extend() return; } - const auto & neighbore_nodes = findNeighboreNodes(x_new); + const auto & neighbor_nodes = findNeighborNodes(x_new); - const auto & node_best_parent = getBestParentNode(x_new, node_nearest, neighbore_nodes); + const auto & node_best_parent = getBestParentNode(x_new, node_nearest, neighbor_nodes); const auto & node_new = addNewNode(x_new, std::const_pointer_cast(node_best_parent)); // Rewire - const auto node_reconnect = getReconnectTargeNode(node_new, neighbore_nodes); + const auto node_reconnect = getReconnectTargeNode(node_new, neighbor_nodes); if (node_reconnect) { reconnect(node_new, std::const_pointer_cast(node_reconnect)); } @@ -197,7 +199,8 @@ void RRTStar::extend() void RRTStar::deleteNodeUsingBranchAndBound() { - // see III.B of Karaman et al. ICRA 2011 + // cspell: ignore Karaman + // ref : III.B of Karaman et al. ICRA 2011 if (!isSolutionFound()) { return; } @@ -341,26 +344,26 @@ NodeConstSharedPtr RRTStar::findNearestNode(const Pose & x_rand) const return node_nearest; } -std::vector RRTStar::findNeighboreNodes(const Pose & x_new) const +std::vector RRTStar::findNeighborNodes(const Pose & x_new) const { // In the original paper of rrtstar, radius is shrinking over time. // However, because we use reeds-shepp distance metric instead of Euclidean metric, - // it is hard to design the shirinking radius update. Usage of informed sampling - // makes the problem far more complex, as the sampling reagion is shirinking over + // it is hard to design the shrinking radius update. Usage of informed sampling + // makes the problem far more complex, as the sampling region is shrinking over // the time. // Due to above difficulty in design of radius update, radius is simply fixed here. // In practice, the fixed radius setting works well as long as mu_ value is - // propery tuned. In car planning scenario, the order or planning world area - // is similar, and turining radius is also similar through different problems. + // properly tuned. In car planning scenario, the order or planning world area + // is similar, and turning radius is also similar through different problems. // So, tuning mu_ parameter is not so difficult. - const double radius_neighbore = mu_; + const double radius_neighbor = mu_; std::vector nodes; for (auto & node : nodes_) { - if (cspace_.distanceLowerBound(node->pose, x_new) > radius_neighbore) continue; - const bool is_neighbour = (cspace_.distance(node->pose, x_new) < radius_neighbore); - if (is_neighbour) { + if (cspace_.distanceLowerBound(node->pose, x_new) > radius_neighbor) continue; + const bool is_neighbor = (cspace_.distance(node->pose, x_new) < radius_neighbor); + if (is_neighbor) { nodes.push_back(node); } } @@ -379,17 +382,17 @@ NodeSharedPtr RRTStar::addNewNode(const Pose & pose, NodeSharedPtr node_parent) } NodeConstSharedPtr RRTStar::getReconnectTargeNode( - const NodeConstSharedPtr node_new, const std::vector & neighbore_nodes) const + const NodeConstSharedPtr node_new, const std::vector & neighbor_nodes) const { NodeConstSharedPtr node_reconnect = nullptr; - for (const auto & node_neighbore : neighbore_nodes) { + for (const auto & node_neighbor : neighbor_nodes) { if (cspace_.isValidPath_child2parent( - node_neighbore->pose, node_new->pose, collision_check_resolution_)) { + node_neighbor->pose, node_new->pose, collision_check_resolution_)) { const double cost_from_start_rewired = - *node_new->cost_from_start + cspace_.distance(node_new->pose, node_neighbore->pose); - if (cost_from_start_rewired < *node_neighbore->cost_from_start) { - node_reconnect = node_neighbore; + *node_new->cost_from_start + cspace_.distance(node_new->pose, node_neighbor->pose); + if (cost_from_start_rewired < *node_neighbor->cost_from_start) { + node_reconnect = node_neighbor; } } } @@ -399,12 +402,12 @@ NodeConstSharedPtr RRTStar::getReconnectTargeNode( NodeConstSharedPtr RRTStar::getBestParentNode( const Pose & pose_new, const NodeConstSharedPtr & node_nearest, - const std::vector & neighbore_nodes) const + const std::vector & neighbor_nodes) const { NodeConstSharedPtr node_best = node_nearest; double cost_min = *(node_nearest->cost_from_start) + cspace_.distance(node_nearest->pose, pose_new); - for (const auto & node : neighbore_nodes) { + for (const auto & node : neighbor_nodes) { const double cost_start_to_new = *(node->cost_from_start) + cspace_.distance(node->pose, pose_new); if (cost_start_to_new < cost_min) { @@ -444,14 +447,14 @@ void RRTStar::reconnect(const NodeSharedPtr & node_new, const NodeSharedPtr & no // node_reconnect_parent -> #nil; // update cost of all descendents of node_reconnect - std::queue bfqueue; - bfqueue.push(node_reconnect); - while (!bfqueue.empty()) { - const auto node = bfqueue.front(); - bfqueue.pop(); + std::queue bf_queue; + bf_queue.push(node_reconnect); + while (!bf_queue.empty()) { + const auto node = bf_queue.front(); + bf_queue.pop(); for (const auto & child : node->childs) { child->cost_from_start = *node->cost_from_start + *child->cost_to_parent; - bfqueue.push(child); + bf_queue.push(child); } } } diff --git a/planning/freespace_planning_algorithms/test/debug_plot.py b/planning/freespace_planning_algorithms/test/debug_plot.py index 7d6277a2756c6..bc96963f09dcb 100755 --- a/planning/freespace_planning_algorithms/test/debug_plot.py +++ b/planning/freespace_planning_algorithms/test/debug_plot.py @@ -91,8 +91,10 @@ class VehicleModel: def from_problem_description(cls, pd: ProblemDescription) -> "VehicleModel": return cls(pd.vehicle_length.data, pd.vehicle_width.data, pd.vehicle_base2back.data) + # cspell: ignore nparr + # nparr means "numpy array" (maybe) def get_vertices(self, pose: Pose) -> np.ndarray: - x, y, yaw = self.posemsg_to_nparr(pose) + x, y, yaw = self.pose_msg_to_nparr(pose) back = -1.0 * self.base2back front = self.length - self.base2back @@ -120,20 +122,20 @@ def euler_from_quaternion(quaternion): z = quaternion.z w = quaternion.w - sinr_cosp = 2 * (w * x + y * z) - cosr_cosp = 1 - 2 * (x * x + y * y) - roll = atan2(sinr_cosp, cosr_cosp) + sin_roll_cos_pitch = 2 * (w * x + y * z) + cos_roll_cos_pitch = 1 - 2 * (x * x + y * y) + roll = atan2(sin_roll_cos_pitch, cos_roll_cos_pitch) - sinp = 2 * (w * y - z * x) - pitch = asin(sinp) + sin_pitch = 2 * (w * y - z * x) + pitch = asin(sin_pitch) - siny_cosp = 2 * (w * z + x * y) - cosy_cosp = 1 - 2 * (y * y + z * z) - yaw = atan2(siny_cosp, cosy_cosp) + sin_yaw_cos_pitch = 2 * (w * z + x * y) + cos_yaw_cos_pitch = 1 - 2 * (y * y + z * z) + yaw = atan2(sin_yaw_cos_pitch, cos_yaw_cos_pitch) return roll, pitch, yaw @staticmethod - def posemsg_to_nparr(pose_msg: Pose) -> Tuple[float, float, float]: + def pose_msg_to_nparr(pose_msg: Pose) -> Tuple[float, float, float]: _, _, yaw = VehicleModel.euler_from_quaternion(pose_msg.orientation) return pose_msg.position.x, pose_msg.position.y, yaw @@ -151,12 +153,12 @@ def plot_problem(pd: ProblemDescription, ax, meta_info): X, Y = np.meshgrid(x_lin, y_lin) ax.contourf(X, Y, arr, cmap="Greys") - vmodel = VehicleModel.from_problem_description(pd) - vmodel.plot_pose(pd.start, ax, "green") - vmodel.plot_pose(pd.goal, ax, "red") + vehicle_model = VehicleModel.from_problem_description(pd) + vehicle_model.plot_pose(pd.start, ax, "green") + vehicle_model.plot_pose(pd.goal, ax, "red") for pose in pd.trajectory.poses: - vmodel.plot_pose(pose, ax, "blue", 0.5) + vehicle_model.plot_pose(pose, ax, "blue", 0.5) text = "elapsed : {0} [msec]".format(int(round(pd.elapsed_time.data))) ax.text(0.3, 0.3, text, fontsize=15, color="red") @@ -168,7 +170,7 @@ def plot_problem(pd: ProblemDescription, ax, meta_info): ax.set_ylim([b_min[1], b_max[1]]) -def create_concate_png(src_list, dest, is_horizontal): +def create_concat_png(src_list, dest, is_horizontal): opt = "+append" if is_horizontal else "-append" cmd = ["convert", opt] for src in src_list: @@ -179,11 +181,14 @@ def create_concate_png(src_list, dest, is_horizontal): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("--concat", action="store_true", help="concat pngs (requires image magick)") + parser.add_argument( + "--concat", action="store_true", help="concat png images (requires imagemagick)" + ) args = parser.parse_args() concat = args.concat dir_name_table: Dict[Tuple[str, int], str] = {} + # cspell: ignore fpalgos, cand prefix = "fpalgos" for cand_dir in os.listdir("/tmp"): if cand_dir.startswith(prefix): @@ -200,7 +205,7 @@ def create_concate_png(src_list, dest, is_horizontal): for i in range(n_algo): algo_name = algo_names[i] - algo_pngs = [] + algo_png_images = [] for j in range(n_case): fig, ax = plt.subplots() @@ -214,10 +219,10 @@ def create_concate_png(src_list, dest, is_horizontal): fig.tight_layout() file_name = os.path.join("/tmp", "plot-{}.png".format(meta_info)) - algo_pngs.append(file_name) + algo_png_images.append(file_name) plt.savefig(file_name) print("saved to {}".format(file_name)) algowise_summary_file = os.path.join("/tmp", "summary-{}.png".format(algo_name)) if concat: - create_concate_png(algo_pngs, algowise_summary_file, True) + create_concat_png(algo_png_images, algowise_summary_file, True) diff --git a/planning/freespace_planning_algorithms/test/debug_plot_rrtstar_core.py b/planning/freespace_planning_algorithms/test/debug_plot_rrtstar_core.py index 3fa6d152eba11..f1155e7aed218 100755 --- a/planning/freespace_planning_algorithms/test/debug_plot_rrtstar_core.py +++ b/planning/freespace_planning_algorithms/test/debug_plot_rrtstar_core.py @@ -25,6 +25,8 @@ import matplotlib.pyplot as plt import numpy as np +# cspell: ignore ndim, ndata, linewidth + @dataclass class Node: diff --git a/planning/freespace_planning_algorithms/test/src/test_freespace_planning_algorithms.cpp b/planning/freespace_planning_algorithms/test/src/test_freespace_planning_algorithms.cpp index 8ea9e0b4af8b5..a7fdab0df7b8f 100644 --- a/planning/freespace_planning_algorithms/test/src/test_freespace_planning_algorithms.cpp +++ b/planning/freespace_planning_algorithms/test/src/test_freespace_planning_algorithms.cpp @@ -35,9 +35,9 @@ namespace fpa = freespace_planning_algorithms; -const double length_lexas = 5.5; -const double width_lexas = 2.75; -const fpa::VehicleShape vehicle_shape = fpa::VehicleShape{length_lexas, width_lexas, 1.5}; +const double length_lexus = 5.5; +const double width_lexus = 2.75; +const fpa::VehicleShape vehicle_shape = fpa::VehicleShape{length_lexus, width_lexus, 1.5}; const double pi = 3.1415926; const std::array start_pose{5.5, 4., pi * 0.5}; const std::array goal_pose1{8.0, 26.3, pi * 1.5}; // easiest @@ -114,22 +114,22 @@ nav_msgs::msg::OccupancyGrid construct_cost_map( } // car1 - if (10.0 < x && x < 10.0 + width_lexas && 22.0 < y && y < 22.0 + length_lexas) { + if (10.0 < x && x < 10.0 + width_lexus && 22.0 < y && y < 22.0 + length_lexus) { costmap_msg.data[i * width + j] = 100.0; } // car2 - if (13.5 < x && x < 13.5 + width_lexas && 22.0 < y && y < 22.0 + length_lexas) { + if (13.5 < x && x < 13.5 + width_lexus && 22.0 < y && y < 22.0 + length_lexus) { costmap_msg.data[i * width + j] = 100.0; } // car3 - if (20.0 < x && x < 20.0 + width_lexas && 22.0 < y && y < 22.0 + length_lexas) { + if (20.0 < x && x < 20.0 + width_lexus && 22.0 < y && y < 22.0 + length_lexus) { costmap_msg.data[i * width + j] = 100.0; } // car4 - if (10.0 < x && x < 10.0 + width_lexas && 10.0 < y && y < 10.0 + length_lexas) { + if (10.0 < x && x < 10.0 + width_lexus && 10.0 < y && y < 10.0 + length_lexus) { costmap_msg.data[i * width + j] = 100.0; } } @@ -238,6 +238,7 @@ enum AlgorithmType { RRTSTAR_UPDATE, RRTSTAR_INFORMED_UPDATE, }; +// cspell: ignore fpalgos std::unordered_map rosbag_dir_prefix_table( {{ASTAR_SINGLE, "fpalgos-astar_single"}, {ASTAR_MULTI, "fpalgos-astar_multi"}, @@ -363,7 +364,7 @@ TEST(AstarSearchTestSuite, MultiCurvature) EXPECT_TRUE(test_algorithm(AlgorithmType::ASTAR_MULTI)); } -TEST(RRTStarTestSuite, Fastetst) { EXPECT_TRUE(test_algorithm(AlgorithmType::RRTSTAR_FASTEST)); } +TEST(RRTStarTestSuite, Fastest) { EXPECT_TRUE(test_algorithm(AlgorithmType::RRTSTAR_FASTEST)); } TEST(RRTStarTestSuite, Update) { EXPECT_TRUE(test_algorithm(AlgorithmType::RRTSTAR_UPDATE)); } diff --git a/planning/obstacle_cruise_planner/README.md b/planning/obstacle_cruise_planner/README.md index e3ddbfb1b157a..81d205c0c1c3e 100644 --- a/planning/obstacle_cruise_planner/README.md +++ b/planning/obstacle_cruise_planner/README.md @@ -200,7 +200,7 @@ $$ | Variable | Description | | ----------------- | --------------------------------------- | -| `d` | actual distane to obstacle | +| `d` | actual distance to obstacle | | `d_{rss}` | ideal distance to obstacle based on RSS | | `v_{min, cruise}` | `min_cruise_target_vel` | | `w_{acc}` | `output_ratio_during_accel` | diff --git a/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/pid_based_planner/pid_based_planner.hpp b/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/pid_based_planner/pid_based_planner.hpp index f94516407e3c5..e15f8f9759660 100644 --- a/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/pid_based_planner/pid_based_planner.hpp +++ b/planning/obstacle_cruise_planner/include/obstacle_cruise_planner/pid_based_planner/pid_based_planner.hpp @@ -82,7 +82,7 @@ class PIDBasedPlanner : public PlannerInterface const ObstacleCruisePlannerData & planner_data, const CruiseObstacleInfo & cruise_obstacle_info); - // velocityinsertion based planner + // velocity insertion based planner Trajectory doCruiseWithTrajectory( const ObstacleCruisePlannerData & planner_data, const CruiseObstacleInfo & cruise_obstacle_info); diff --git a/planning/obstacle_velocity_limiter/README.md b/planning/obstacle_velocity_limiter/README.md index 3a0807d4e1a5d..d670f07d26e9d 100644 --- a/planning/obstacle_velocity_limiter/README.md +++ b/planning/obstacle_velocity_limiter/README.md @@ -21,7 +21,7 @@ If the footprint collides with some obstacle, the velocity at the trajectory poi The motion of the ego vehicle is simulated at each trajectory point using the `heading`, `velocity`, and `steering` defined at the point. Footprints are then constructed from these simulations and checked for collision. -If a collision is found, the distance from the trajectory point is used to calculate the adjusted velocity that would produce a collision-free footprint. Parameter `simulation.distance_method` allow to switch between an exact distance calculation and a less expensive approximation using a simple euclidian distance. +If a collision is found, the distance from the trajectory point is used to calculate the adjusted velocity that would produce a collision-free footprint. Parameter `simulation.distance_method` allow to switch between an exact distance calculation and a less expensive approximation using a simple euclidean distance. Two models can be selected with parameter `simulation.model` for simulating the motion of the vehicle: a simple particle model and a more complicated bicycle model. @@ -127,7 +127,7 @@ If a collision is found, the velocity at the trajectory point is adjusted such t $velocity = \frac{dist\_to\_collision}{min\_ttc}$ To prevent sudden deceleration of the ego vehicle, the parameter `max_deceleration` limits the deceleration relative to the current ego velocity. -For a trajectory point occuring at a duration `t` in the future (calculated from the original velocity profile), +For a trajectory point occurring at a duration `t` in the future (calculated from the original velocity profile), the adjusted velocity cannot be set lower than $v_{current} - t * max\_deceleration$. Furthermore, a parameter `min_adjusted_velocity` diff --git a/planning/obstacle_velocity_limiter/benchmarks/collision_checker_benchmark.cpp b/planning/obstacle_velocity_limiter/benchmarks/collision_checker_benchmark.cpp index 936476c800117..cfd8ea0f3e244 100644 --- a/planning/obstacle_velocity_limiter/benchmarks/collision_checker_benchmark.cpp +++ b/planning/obstacle_velocity_limiter/benchmarks/collision_checker_benchmark.cpp @@ -14,6 +14,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/debug.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/debug.hpp index 7b9553a936ee7..c33e283ed7c0c 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/debug.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/debug.hpp @@ -17,6 +17,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/distance.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/distance.hpp index 22d70463fc0d9..ca80fc468079d 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/distance.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/distance.hpp @@ -18,6 +18,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/forward_projection.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/forward_projection.hpp index 9c545e6fe2821..51b5111b9d6ac 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/forward_projection.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/forward_projection.hpp @@ -17,6 +17,7 @@ #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/map_utils.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/map_utils.hpp index b1e8f848acd88..32b69b149e9f2 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/map_utils.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/map_utils.hpp @@ -16,6 +16,7 @@ #define OBSTACLE_VELOCITY_LIMITER__MAP_UTILS_HPP_ #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter.hpp index b95d3849cda9a..91611938119e5 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter.hpp @@ -18,6 +18,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include @@ -102,13 +103,13 @@ polygon_t createEnvelopePolygon(const std::vector & footprints); /// @details depending on the method used, multiple lines can be created for a same trajectory point /// @param[in] trajectory input trajectory /// @param[in] params projection parameters -/// @return projecton lines for each trajectory point +/// @return projection lines for each trajectory point std::vector createProjectedLines( const Trajectory & trajectory, ProjectionParameters & params); /// @brief limit the velocity of the given trajectory /// @param[in] trajectory input trajectory -/// @param[in] collision_checker object used to retrive collision points +/// @param[in] collision_checker object used to retrieve collision points /// @param[in] projections forward projection lines at each trajectory point /// @param[in] footprints footprint of the forward projection at each trajectory point /// @param[in] projection_params projection parameters diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter_node.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter_node.hpp index 1575fbcd13423..a74128f57d6fd 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter_node.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacle_velocity_limiter_node.hpp @@ -18,6 +18,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacles.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacles.hpp index 4d82f31dc019c..0d7edc649857d 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacles.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/obstacles.hpp @@ -17,6 +17,7 @@ #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/occupancy_grid_utils.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/occupancy_grid_utils.hpp index 9babbe8defb5a..61f4f575f826b 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/occupancy_grid_utils.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/occupancy_grid_utils.hpp @@ -17,6 +17,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/parameters.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/parameters.hpp index cb8c812661bfc..7521e6b1a0bba 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/parameters.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/parameters.hpp @@ -16,6 +16,7 @@ #define OBSTACLE_VELOCITY_LIMITER__PARAMETERS_HPP_ #include +// cspell: ignore multipolygon, multilinestring #include #include @@ -39,6 +40,7 @@ struct ObstacleParameters static constexpr auto RTREE_SEGMENTS_PARAM = "obstacles.rtree_min_segments"; static constexpr auto RTREE_POINTS_PARAM = "obstacles.rtree_min_points"; + // cspell: ignore OCCUPANCYGRID enum { POINTCLOUD, OCCUPANCYGRID, STATIC_ONLY } dynamic_source = OCCUPANCYGRID; int8_t occupancy_grid_threshold{}; Float dynamic_obstacles_buffer{}; diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/pointcloud_utils.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/pointcloud_utils.hpp index 9714a7003b1db..80d79791d0bbc 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/pointcloud_utils.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/pointcloud_utils.hpp @@ -17,6 +17,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include "tier4_autoware_utils/ros/transform_listener.hpp" #include @@ -39,7 +40,7 @@ pcl::PointCloud::Ptr transformPointCloud( const PointCloud & pointcloud_msg, tier4_autoware_utils::TransformListener & transform_listener, const std::string & target_frame); -/// @brief filter the pointcloud to keep only relevent points +/// @brief filter the pointcloud to keep only relevant points /// @param[in,out] pointcloud to filter /// @param[in] masks obstacle masks used to filter the pointcloud void filterPointCloud(pcl::PointCloud::Ptr pointcloud, const ObstacleMasks & masks); diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/trajectory_preprocessing.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/trajectory_preprocessing.hpp index 258ef8f01b5f5..2ee003206339d 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/trajectory_preprocessing.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/trajectory_preprocessing.hpp @@ -16,6 +16,7 @@ #define OBSTACLE_VELOCITY_LIMITER__TRAJECTORY_PREPROCESSING_HPP_ #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring namespace obstacle_velocity_limiter { diff --git a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/types.hpp b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/types.hpp index f11b2ff87af23..81de7463b9e42 100644 --- a/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/types.hpp +++ b/planning/obstacle_velocity_limiter/include/obstacle_velocity_limiter/types.hpp @@ -23,6 +23,7 @@ #include #include +// cspell: ignore multipolygon, multilinestring namespace obstacle_velocity_limiter { using autoware_auto_perception_msgs::msg::PredictedObjects; diff --git a/planning/obstacle_velocity_limiter/src/debug.cpp b/planning/obstacle_velocity_limiter/src/debug.cpp index fbbf48e69b023..853dee2d20f49 100644 --- a/planning/obstacle_velocity_limiter/src/debug.cpp +++ b/planning/obstacle_velocity_limiter/src/debug.cpp @@ -16,6 +16,7 @@ #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/src/distance.cpp b/planning/obstacle_velocity_limiter/src/distance.cpp index 2e0ff52c1922c..68d634022c5f7 100644 --- a/planning/obstacle_velocity_limiter/src/distance.cpp +++ b/planning/obstacle_velocity_limiter/src/distance.cpp @@ -38,18 +38,18 @@ std::optional distanceToClosestCollision( for (const auto & obs_point : collision_checker.intersections(footprint)) { if (params.distance_method == ProjectionParameters::EXACT) { if (params.model == ProjectionParameters::PARTICLE) { - const auto euclidian_dist = bg::distance(obs_point, projection.front()); + const auto euclidean_dist = bg::distance(obs_point, projection.front()); const auto collision_heading = std::atan2( obs_point.y() - projection.front().y(), obs_point.x() - projection.front().x()); const auto angle = params.heading - collision_heading; - const auto long_dist = std::abs(std::cos(angle)) * euclidian_dist; + const auto long_dist = std::abs(std::cos(angle)) * euclidean_dist; min_dist = std::min(min_dist, long_dist); } else { // BICYCLE model with curved projection min_dist = std::min(min_dist, arcDistance(projection.front(), params.heading, obs_point)); } } else { // APPROXIMATION - const auto euclidian_dist = bg::distance(obs_point, projection.front()); - min_dist = std::min(min_dist, euclidian_dist); + const auto euclidean_dist = bg::distance(obs_point, projection.front()); + min_dist = std::min(min_dist, euclidean_dist); } } if (min_dist != std::numeric_limits::max()) distance = min_dist; diff --git a/planning/obstacle_velocity_limiter/src/forward_projection.cpp b/planning/obstacle_velocity_limiter/src/forward_projection.cpp index b4000389b19e8..d3193eefe0114 100644 --- a/planning/obstacle_velocity_limiter/src/forward_projection.cpp +++ b/planning/obstacle_velocity_limiter/src/forward_projection.cpp @@ -13,6 +13,7 @@ // limitations under the License. #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/src/map_utils.cpp b/planning/obstacle_velocity_limiter/src/map_utils.cpp index 5e39daef89c64..e84734355268e 100644 --- a/planning/obstacle_velocity_limiter/src/map_utils.cpp +++ b/planning/obstacle_velocity_limiter/src/map_utils.cpp @@ -17,6 +17,7 @@ #include "lanelet2_core/primitives/LineString.h" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/src/obstacle_velocity_limiter_node.cpp b/planning/obstacle_velocity_limiter/src/obstacle_velocity_limiter_node.cpp index 15dd0fbadb5bb..6144f338159da 100644 --- a/planning/obstacle_velocity_limiter/src/obstacle_velocity_limiter_node.cpp +++ b/planning/obstacle_velocity_limiter/src/obstacle_velocity_limiter_node.cpp @@ -21,6 +21,7 @@ #include "obstacle_velocity_limiter/parameters.hpp" #include "obstacle_velocity_limiter/trajectory_preprocessing.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include diff --git a/planning/obstacle_velocity_limiter/src/obstacles.cpp b/planning/obstacle_velocity_limiter/src/obstacles.cpp index ac8444a508be8..417ff6b7783e2 100644 --- a/planning/obstacle_velocity_limiter/src/obstacles.cpp +++ b/planning/obstacle_velocity_limiter/src/obstacles.cpp @@ -79,6 +79,7 @@ void addSensorObstacles( const ObstacleMasks & masks, tier4_autoware_utils::TransformListener & transform_listener, const std::string & target_frame, const ObstacleParameters & obstacle_params) { + // cspell: ignore OCCUPANCYGRID if (obstacle_params.dynamic_source == ObstacleParameters::OCCUPANCYGRID) { auto grid_map = convertToGridMap(occupancy_grid); threshold(grid_map, obstacle_params.occupancy_grid_threshold); diff --git a/planning/obstacle_velocity_limiter/src/occupancy_grid_utils.cpp b/planning/obstacle_velocity_limiter/src/occupancy_grid_utils.cpp index 72b9bf6431f03..397e20d05ebe0 100644 --- a/planning/obstacle_velocity_limiter/src/occupancy_grid_utils.cpp +++ b/planning/obstacle_velocity_limiter/src/occupancy_grid_utils.cpp @@ -15,6 +15,7 @@ #include "obstacle_velocity_limiter/occupancy_grid_utils.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include #include diff --git a/planning/obstacle_velocity_limiter/src/pointcloud_utils.cpp b/planning/obstacle_velocity_limiter/src/pointcloud_utils.cpp index 4f9ca6c5bc3e7..25339a49529d6 100644 --- a/planning/obstacle_velocity_limiter/src/pointcloud_utils.cpp +++ b/planning/obstacle_velocity_limiter/src/pointcloud_utils.cpp @@ -15,6 +15,7 @@ #include "obstacle_velocity_limiter/pointcloud_utils.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/test/test_collision_distance.cpp b/planning/obstacle_velocity_limiter/test/test_collision_distance.cpp index e9cf8d9ad4dd6..64693ef8ef249 100644 --- a/planning/obstacle_velocity_limiter/test/test_collision_distance.cpp +++ b/planning/obstacle_velocity_limiter/test/test_collision_distance.cpp @@ -15,6 +15,7 @@ #include "obstacle_velocity_limiter/distance.hpp" #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include "tier4_autoware_utils/geometry/geometry.hpp" #include diff --git a/planning/obstacle_velocity_limiter/test/test_forward_projection.cpp b/planning/obstacle_velocity_limiter/test/test_forward_projection.cpp index 3275bf1ab5506..6e35ec95c62e0 100644 --- a/planning/obstacle_velocity_limiter/test/test_forward_projection.cpp +++ b/planning/obstacle_velocity_limiter/test/test_forward_projection.cpp @@ -14,6 +14,7 @@ #include "obstacle_velocity_limiter/forward_projection.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include "tier4_autoware_utils/geometry/geometry.hpp" #include diff --git a/planning/obstacle_velocity_limiter/test/test_obstacles.cpp b/planning/obstacle_velocity_limiter/test/test_obstacles.cpp index 70a0e94491b19..f75e808828ca6 100644 --- a/planning/obstacle_velocity_limiter/test/test_obstacles.cpp +++ b/planning/obstacle_velocity_limiter/test/test_obstacles.cpp @@ -14,6 +14,7 @@ #include "obstacle_velocity_limiter/obstacles.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/obstacle_velocity_limiter/test/test_occupancy_grid_utils.cpp b/planning/obstacle_velocity_limiter/test/test_occupancy_grid_utils.cpp index 486dfe74eed73..a6ff8543f6ad0 100644 --- a/planning/obstacle_velocity_limiter/test/test_occupancy_grid_utils.cpp +++ b/planning/obstacle_velocity_limiter/test/test_occupancy_grid_utils.cpp @@ -14,6 +14,7 @@ #include "obstacle_velocity_limiter/occupancy_grid_utils.hpp" #include "obstacle_velocity_limiter/types.hpp" +// cspell: ignore multipolygon, multilinestring #include diff --git a/planning/planning_debug_tools/Readme.md b/planning/planning_debug_tools/Readme.md index f2d29c796c747..6538bf1db222d 100644 --- a/planning/planning_debug_tools/Readme.md +++ b/planning/planning_debug_tools/Readme.md @@ -77,6 +77,9 @@ PlotCurrentVelocity('localization_kinematic_state', '/localization/kinematic_sta in Function Library ![image](./image/script.png) + + + ```lua function PlotValue(name, path, timestamp, value) diff --git a/planning/planning_debug_tools/scripts/closest_velocity_checker.py b/planning/planning_debug_tools/scripts/closest_velocity_checker.py index 7051cf31bc6a9..292a2ae49ae9c 100755 --- a/planning/planning_debug_tools/scripts/closest_velocity_checker.py +++ b/planning/planning_debug_tools/scripts/closest_velocity_checker.py @@ -69,8 +69,8 @@ def __init__(self): # planning path and trajectories profile = rclpy.qos.QoSProfile(depth=1) - transien_local = rclpy.qos.QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL - transient_local_profile = rclpy.qos.QoSProfile(depth=1, durability=transien_local) + transient_local = rclpy.qos.QoSDurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL + transient_local_profile = rclpy.qos.QoSProfile(depth=1, durability=transient_local) lane_drv = "/planning/scenario_planning/lane_driving" scenario = "/planning/scenario_planning" self.sub0 = self.create_subscription( diff --git a/planning/planning_validator/include/planning_validator/utils.hpp b/planning/planning_validator/include/planning_validator/utils.hpp index 4497ee1d77eee..9b5775642424c 100644 --- a/planning/planning_validator/include/planning_validator/utils.hpp +++ b/planning/planning_validator/include/planning_validator/utils.hpp @@ -38,6 +38,7 @@ Trajectory resampleTrajectory(const Trajectory & trajectory, const double min_in void calcCurvature(const Trajectory & trajectory, std::vector & curvatures); +// cspell: ignore steerings void calcSteeringAngles( const Trajectory & trajectory, const double wheelbase, std::vector & steerings); diff --git a/sensing/geo_pos_conv/src/geo_pos_conv.cpp b/sensing/geo_pos_conv/src/geo_pos_conv.cpp index 119424bf19db0..a046b73f65a16 100644 --- a/sensing/geo_pos_conv/src/geo_pos_conv.cpp +++ b/sensing/geo_pos_conv/src/geo_pos_conv.cpp @@ -211,7 +211,7 @@ void geo_pos_conv::conv_llh2xyz(void) Pmo = 0.9999; /*WGS84 Parameters*/ - AW = 6378137.0; // Semimajor Axis + AW = 6378137.0; // Semi-major Axis FW = 1.0 / 298.257222101; // 298.257223563 //Geometrical flattening Pe = sqrt(2.0 * FW - pow(FW, 2)); diff --git a/sensing/gnss_poser/include/gnss_poser/convert.hpp b/sensing/gnss_poser/include/gnss_poser/convert.hpp index 1c3c0dbb6d602..1ad25ae35a124 100644 --- a/sensing/gnss_poser/include/gnss_poser/convert.hpp +++ b/sensing/gnss_poser/include/gnss_poser/convert.hpp @@ -30,8 +30,8 @@ namespace gnss_poser { enum class MGRSPrecision { - _10_KIRO_METER = 1, - _1_KIRO_METER = 2, + _10_KILO_METER = 1, + _1_KILO_METER = 2, _100_METER = 3, _10_METER = 4, _1_METER = 5, @@ -87,7 +87,8 @@ GNSSStat NavSatFix2UTM( try { GeographicLib::UTMUPS::Forward( - nav_sat_fix_msg.latitude, nav_sat_fix_msg.longitude, utm.zone, utm.northup, utm.x, utm.y); + nav_sat_fix_msg.latitude, nav_sat_fix_msg.longitude, utm.zone, utm.east_north_up, utm.x, + utm.y); utm.z = EllipsoidHeight2OrthometricHeight(nav_sat_fix_msg, logger); @@ -111,14 +112,14 @@ GNSSStat NavSatFix2LocalCartesianUTM( utm_origin.coordinate_system = CoordinateSystem::UTM; GeographicLib::UTMUPS::Forward( nav_sat_fix_origin.latitude, nav_sat_fix_origin.longitude, utm_origin.zone, - utm_origin.northup, utm_origin.x, utm_origin.y); + utm_origin.east_north_up, utm_origin.x, utm_origin.y); utm_origin.z = EllipsoidHeight2OrthometricHeight(nav_sat_fix_origin, logger); // individual coordinates of global coordinate system double global_x = 0.0; double global_y = 0.0; GeographicLib::UTMUPS::Forward( - nav_sat_fix_msg.latitude, nav_sat_fix_msg.longitude, utm_origin.zone, utm_origin.northup, - global_x, global_y); + nav_sat_fix_msg.latitude, nav_sat_fix_msg.longitude, utm_origin.zone, + utm_origin.east_north_up, global_x, global_y); utm_local.latitude = nav_sat_fix_msg.latitude; utm_local.longitude = nav_sat_fix_msg.longitude; utm_local.altitude = nav_sat_fix_msg.altitude; @@ -142,7 +143,8 @@ GNSSStat UTM2MGRS( try { std::string mgrs_code; GeographicLib::MGRS::Forward( - utm.zone, utm.northup, utm.x, utm.y, utm.latitude, static_cast(precision), mgrs_code); + utm.zone, utm.east_north_up, utm.x, utm.y, utm.latitude, static_cast(precision), + mgrs_code); mgrs.mgrs_zone = std::string(mgrs_code.substr(0, GZD_ID_size)); mgrs.x = std::stod(mgrs_code.substr(GZD_ID_size, static_cast(precision))) * std::pow( diff --git a/sensing/gnss_poser/include/gnss_poser/gnss_stat.hpp b/sensing/gnss_poser/include/gnss_poser/gnss_stat.hpp index 030e569d69a3d..46fdc6eeff9ee 100644 --- a/sensing/gnss_poser/include/gnss_poser/gnss_stat.hpp +++ b/sensing/gnss_poser/include/gnss_poser/gnss_stat.hpp @@ -30,7 +30,7 @@ struct GNSSStat { GNSSStat() : coordinate_system(CoordinateSystem::MGRS), - northup(true), + east_north_up(true), zone(0), mgrs_zone(""), x(0), @@ -43,7 +43,7 @@ struct GNSSStat } CoordinateSystem coordinate_system; - bool northup; + bool east_north_up; int zone; std::string mgrs_zone; double x; diff --git a/sensing/image_diagnostics/README.md b/sensing/image_diagnostics/README.md index ff033d6874bb1..03858088564b3 100644 --- a/sensing/image_diagnostics/README.md +++ b/sensing/image_diagnostics/README.md @@ -8,7 +8,7 @@ The `image_diagnostics` is a node that check the status of the input raw image. Below figure shows the flowchart of image diagnostics node. Each image is divided into small blocks for block state assessment. -![image diagnostics flowchar ](./image/image_diagnostics_overview.svg) +![image diagnostics flowchart ](./image/image_diagnostics_overview.svg) Each small image block state is assessed as below figure. diff --git a/sensing/pointcloud_preprocessor/config/processing_time_ms.xml b/sensing/pointcloud_preprocessor/config/processing_time_ms.xml index 7f7f0cdefdb8e..5da1ec3720fb0 100644 --- a/sensing/pointcloud_preprocessor/config/processing_time_ms.xml +++ b/sensing/pointcloud_preprocessor/config/processing_time_ms.xml @@ -49,7 +49,7 @@ - + diff --git a/sensing/pointcloud_preprocessor/docs/blockage_diag.md b/sensing/pointcloud_preprocessor/docs/blockage_diag.md index 6c51755768320..519bd831fd39c 100644 --- a/sensing/pointcloud_preprocessor/docs/blockage_diag.md +++ b/sensing/pointcloud_preprocessor/docs/blockage_diag.md @@ -50,7 +50,7 @@ This implementation inherits `pointcloud_preprocessor::Filter` class, please ref ## Assumptions / Known limits -1. Only Hesai Pandar40P and Hesai PandarQT were tested. For a new LiDAR, it is neccessary to check order of channel id in vertical distribution manually and modifiy the code. +1. Only Hesai Pandar40P and Hesai PandarQT were tested. For a new LiDAR, it is necessary to check order of channel id in vertical distribution manually and modify the code. 2. The current method is still limited for dust type of blockage when dust particles are sparsely distributed. ## (Optional) Error detection and handling diff --git a/sensing/pointcloud_preprocessor/docs/distortion-corrector.md b/sensing/pointcloud_preprocessor/docs/distortion-corrector.md index 2aaf9d5a4f206..dcb03cc792cae 100644 --- a/sensing/pointcloud_preprocessor/docs/distortion-corrector.md +++ b/sensing/pointcloud_preprocessor/docs/distortion-corrector.md @@ -9,7 +9,7 @@ Since the LiDAR sensor scans by rotating an internal laser, the resulting point ## Inner-workings / Algorithms - Use the equations below (specific to the Velodyne 32C sensor) to obtain an accurate timestamp for each scan data point. -- Use twist information to determine the distance the ego-vehicle has travelled between the time that the scan started and the corrected timestamp of each point, and then correct the position of the point. +- Use twist information to determine the distance the ego-vehicle has traveled between the time that the scan started and the corrected timestamp of each point, and then correct the position of the point. The offset equation is given by $ TimeOffset = (55.296 \mu s _SequenceIndex) + (2.304 \mu s_ DataPointIndex) $ diff --git a/sensing/pointcloud_preprocessor/docs/image/blockage_diag_flowchart.drawio.svg b/sensing/pointcloud_preprocessor/docs/image/blockage_diag_flowchart.drawio.svg index e1d0673d61eff..c8cb4e9c57a5f 100644 --- a/sensing/pointcloud_preprocessor/docs/image/blockage_diag_flowchart.drawio.svg +++ b/sensing/pointcloud_preprocessor/docs/image/blockage_diag_flowchart.drawio.svg @@ -58,14 +58,14 @@ >
- no retrurn region + no return region
detection
- no retrurn region... + no return region... @@ -82,7 +82,7 @@
small segment
- fillter + filter
@@ -179,11 +179,11 @@
-
diagnotics
+
diagnostics
- diagnotics + diagnostics
- Frist return (weak) + First return (weak)
- Frist retur... + First retur... diff --git a/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/passthrough_filter/passthrough_uint16.hpp b/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/passthrough_filter/passthrough_uint16.hpp index 5336efb7d81e9..8115a46c1ffbc 100644 --- a/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/passthrough_filter/passthrough_uint16.hpp +++ b/sensing/pointcloud_preprocessor/include/pointcloud_preprocessor/passthrough_filter/passthrough_uint16.hpp @@ -62,6 +62,7 @@ namespace pcl { +// cspell: ignore ptfilter /** \brief @b PassThroughUInt16 passes points in a cloud based on constraints for one particular * field of the point type. \details Iterates through the entire input once, automatically filtering * non-finite points and the points outside the interval specified by setFilterLimits(), which diff --git a/sensing/pointcloud_preprocessor/src/outlier_filter/dual_return_outlier_filter_nodelet.cpp b/sensing/pointcloud_preprocessor/src/outlier_filter/dual_return_outlier_filter_nodelet.cpp index 05a404c635ee6..139cf56dccce7 100644 --- a/sensing/pointcloud_preprocessor/src/outlier_filter/dual_return_outlier_filter_nodelet.cpp +++ b/sensing/pointcloud_preprocessor/src/outlier_filter/dual_return_outlier_filter_nodelet.cpp @@ -186,7 +186,7 @@ void DualReturnOutlierFilterComponent::filter( } else if (keep_next) { temp_segment.points.push_back(*iter); keep_next = false; - // Analyse segment points here + // Analyze segment points here } else { // Log the deleted azimuth and its distance for analysis switch (roi_mode_map_[roi_mode_]) { @@ -220,7 +220,7 @@ void DualReturnOutlierFilterComponent::filter( } } } - // Analyse last segment points here + // Analyze last segment points here std::vector noise_frequency(horizontal_bins, 0); uint current_deleted_index = 0; uint current_temp_segment_index = 0; @@ -301,7 +301,7 @@ void DualReturnOutlierFilterComponent::filter( } else if (keep_next) { temp_segment.points.push_back(*iter); keep_next = false; - // Analyse segment points here + // Analyze segment points here } else { // Log the deleted azimuth and its distance for analysis // deleted_azimuths.push_back(iter->azimuth < 0.f ? 0.f : iter->azimuth); diff --git a/sensing/pointcloud_preprocessor/src/passthrough_filter/passthrough_uint16.cpp b/sensing/pointcloud_preprocessor/src/passthrough_filter/passthrough_uint16.cpp index cd589e252544b..3a40408bcd8de 100644 --- a/sensing/pointcloud_preprocessor/src/passthrough_filter/passthrough_uint16.cpp +++ b/sensing/pointcloud_preprocessor/src/passthrough_filter/passthrough_uint16.cpp @@ -137,6 +137,7 @@ void pcl::PassThroughUInt16::applyFilter(PCLPointCloud2 & o return; } + // cspell: ignore badpt std::uint16_t badpt = user_filter_value_; // Check whether we need to store filtered valued in place if (keep_organized_) { @@ -157,7 +158,7 @@ void pcl::PassThroughUInt16::applyFilter(PCLPointCloud2 & o if (filter_limit_negative_) { // Use a threshold for cutting out points which inside the interval if ((distance_value < filter_limit_max_) && (distance_value > filter_limit_min_)) { - // Unoptimized memcpys: assume fields x, y, z are in random order + // Unoptimized memcpy functions: assume fields x, y, z are in random order memcpy(&output.data[xyz_offset[0]], &badpt, sizeof(std::uint16_t)); memcpy(&output.data[xyz_offset[1]], &badpt, sizeof(std::uint16_t)); memcpy(&output.data[xyz_offset[2]], &badpt, sizeof(std::uint16_t)); @@ -170,7 +171,7 @@ void pcl::PassThroughUInt16::applyFilter(PCLPointCloud2 & o } else { // Use a threshold for cutting out points which are too close/far away if ((distance_value > filter_limit_max_) || (distance_value < filter_limit_min_)) { - // Unoptimized memcpys: assume fields x, y, z are in random order + // Unoptimized memcpy functions: assume fields x, y, z are in random order memcpy(&output.data[xyz_offset[0]], &badpt, sizeof(std::uint16_t)); memcpy(&output.data[xyz_offset[1]], &badpt, sizeof(std::uint16_t)); memcpy(&output.data[xyz_offset[2]], &badpt, sizeof(std::uint16_t)); @@ -220,7 +221,7 @@ void pcl::PassThroughUInt16::applyFilter(PCLPointCloud2 & o } } - // Unoptimized memcpys: assume fields x, y, z are in random order + // Unoptimized memcpy functions: assume fields x, y, z are in random order memcpy(&pt[0], &input_->data[xyz_offset[0]], sizeof(std::uint16_t)); memcpy(&pt[1], &input_->data[xyz_offset[1]], sizeof(std::uint16_t)); memcpy(&pt[2], &input_->data[xyz_offset[2]], sizeof(std::uint16_t)); @@ -245,7 +246,7 @@ void pcl::PassThroughUInt16::applyFilter(PCLPointCloud2 & o } else { // No distance filtering, process all data. // No need to check for is_organized here as we did it above for (int cp = 0; cp < nr_points; ++cp, xyz_offset += input_->point_step) { - // Unoptimized memcpys: assume fields x, y, z are in random order + // Unoptimized memcpy functions: assume fields x, y, z are in random order memcpy(&pt[0], &input_->data[xyz_offset[0]], sizeof(std::uint16_t)); memcpy(&pt[1], &input_->data[xyz_offset[1]], sizeof(std::uint16_t)); memcpy(&pt[2], &input_->data[xyz_offset[2]], sizeof(std::uint16_t)); diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp index 670e58fb936cc..44b2f0dfe6ef0 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid.hpp @@ -94,6 +94,7 @@ class VoxelGridNearestCentroid : public VoxelGrid using VoxelGrid::max_b_; using VoxelGrid::inverse_leaf_size_; using VoxelGrid::div_b_; + // cspell: ignore divb using VoxelGrid::divb_mul_; typedef typename pcl::traits::fieldList::type FieldList; @@ -216,7 +217,7 @@ class VoxelGridNearestCentroid : public VoxelGrid : searchable_(true), // min_points_per_voxel_ (6), min_points_per_voxel_(1), - // min_covar_eigvalue_mult_ (0.01), + // min_covar_eigenvalue_mult_ (0.01), leaves_(), voxel_centroids_(), voxel_centroids_leaf_indices_(), @@ -257,12 +258,12 @@ class VoxelGridNearestCentroid : public VoxelGrid inline int getMinPointPerVoxel() { return min_points_per_voxel_; } /** \brief Set the minimum allowable ratio between eigenvalues to prevent singular covariance - * matrices. \param[in] min_covar_eigvalue_mult the minimum allowable ratio between eigenvalues + * matrices. \param[in] min_covar_eigenvalue_mult the minimum allowable ratio between eigenvalues */ // inline void - // setCovEigValueInflationRatio (double min_covar_eigvalue_mult) + // setCovEigValueInflationRatio (double min_covar_eigenvalue_mult) // { - // min_covar_eigvalue_mult_ = min_covar_eigvalue_mult; + // min_covar_eigenvalue_mult_ = min_covar_eigenvalue_mult; // } /** \brief Get the minimum allowable ratio between eigenvalues to prevent singular covariance @@ -271,7 +272,7 @@ class VoxelGridNearestCentroid : public VoxelGrid // inline double // getCovEigValueInflationRatio () // { - // return min_covar_eigvalue_mult_; + // return min_covar_eigenvalue_mult_; // } /** \brief Filter cloud and initializes voxel structure. @@ -516,7 +517,7 @@ class VoxelGridNearestCentroid : public VoxelGrid /** \brief Minimum allowable ratio between eigenvalues to prevent singular covariance * matrices. */ - // double min_covar_eigvalue_mult_; + // double min_covar_eigenvalue_mult_; /** \brief Voxel structure containing all leaf nodes (includes voxels with less than * a sufficient number of points). */ diff --git a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp index bd285e17edac7..6298c4a2e4153 100644 --- a/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp +++ b/sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp @@ -126,6 +126,7 @@ void pcl::VoxelGridNearestCentroid::applyFilter(PointCloud & output) // Clear the leaves leaves_.clear(); + // cspell: ignore divb // Set up the division multiplier divb_mul_ = Eigen::Vector4i(1, div_b_[0], div_b_[0] * div_b_[1], 0); @@ -299,7 +300,7 @@ void pcl::VoxelGridNearestCentroid::applyFilter(PointCloud & output) // Eigen values less than a threshold of max eigen value are inflated to a set fraction of the // max eigen value. - // double min_covar_eigvalue; + // double min_covar_eigenvalue; for (typename std::map::iterator it = leaves_.begin(); it != leaves_.end(); ++it) { // Normalize the centroid diff --git a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp index 0e61f2d1122dc..e20c19da93af0 100644 --- a/simulator/dummy_perception_publisher/src/signed_distance_function.cpp +++ b/simulator/dummy_perception_publisher/src/signed_distance_function.cpp @@ -53,7 +53,7 @@ double BoxSDF::operator()(double x, double y) const const auto && vec_global = tf2::Vector3(x, y, 0.0); const auto vec_local = tf_local_to_global_(vec_global); - // As for signed distance field for a box, please refere: + // As for signed distance field for a box, please refer: // https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm const auto sd_val_x = std::abs(vec_local.getX()) - 0.5 * length_; const auto sd_val_y = std::abs(vec_local.getY()) - 0.5 * width_; diff --git a/tools/simulator_test/simulator_compatibility_test/README.md b/tools/simulator_test/simulator_compatibility_test/README.md index 2b6f2a3b8928c..5dc9d233ce19d 100644 --- a/tools/simulator_test/simulator_compatibility_test/README.md +++ b/tools/simulator_test/simulator_compatibility_test/README.md @@ -13,8 +13,8 @@ File structure - test_morai_sim 1. test_base provides shared methods for testing. Other test codes are created based on functions defined here. -2. test_sim_common_manual_testing provides the most basic functions. Any simualtor can be tested using codes here. However, to make these codes usable with any simulators, the codes do not include any features for test automation. -3. test_morai_sim is an automated version of test_sim_common_manual_testing for MORAI SIM: Drive. Thus it includes 'MORAI SIM: Drive'-specific codes. Users of the other simulators may create similar version for thier simulator of interest. +2. test_sim_common_manual_testing provides the most basic functions. Any simulator can be tested using codes here. However, to make these codes usable with any simulators, the codes do not include any features for test automation. +3. test_morai_sim is an automated version of test_sim_common_manual_testing for MORAI SIM: Drive. Thus it includes 'MORAI SIM: Drive'-specific codes. Users of the other simulators may create similar version for their simulator of interest. ## Test Procedures for test_sim_common_manual_testing diff --git a/tools/simulator_test/simulator_compatibility_test/setup.py b/tools/simulator_test/simulator_compatibility_test/setup.py index 93ce1ab547e7b..f5b1e18cfdaf7 100644 --- a/tools/simulator_test/simulator_compatibility_test/setup.py +++ b/tools/simulator_test/simulator_compatibility_test/setup.py @@ -4,6 +4,8 @@ from setuptools import SetuptoolsDeprecationWarning from setuptools import setup +# cspell: ignore moraisim + simplefilter("ignore", category=SetuptoolsDeprecationWarning) simplefilter("ignore", category=PkgResourcesDeprecationWarning) diff --git a/tools/simulator_test/simulator_compatibility_test/simulator_compatibility_test/publishers/moraisim/morai_ctrl_cmd.py b/tools/simulator_test/simulator_compatibility_test/simulator_compatibility_test/publishers/moraisim/morai_ctrl_cmd.py index c8822d6f3194a..a1af495cd02bd 100644 --- a/tools/simulator_test/simulator_compatibility_test/simulator_compatibility_test/publishers/moraisim/morai_ctrl_cmd.py +++ b/tools/simulator_test/simulator_compatibility_test/simulator_compatibility_test/publishers/moraisim/morai_ctrl_cmd.py @@ -18,6 +18,7 @@ def __init__(self): self.topic = "/ctrl_cmd" self.publisher_ = self.create_publisher(CtrlCmd, self.topic, 10) + # cspell: ignore longl def publish_msg(self, cmd): msg = CtrlCmd() msg.longl_cmd_type = cmd["longCmdType"] diff --git a/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/README.md b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/README.md index c7b6432686218..b594f389db34b 100644 --- a/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/README.md +++ b/vehicle/accel_brake_map_calibrator/accel_brake_map_calibrator/README.md @@ -243,6 +243,7 @@ Update the offsets by RLS in four grids around newly obtained data. By consideri **Advantage** : No data is wasted because updates are performed on the 4 grids around the data with appropriate weighting. **Disadvantage** : Accuracy may be degraded due to extreme bias of the data. For example, if data $z(k)$ is biased near $Z_{RR}$ in Fig. 2, updating is performed at the four surrounding points ( $Z_{RR}$, $Z_{RL}$, $Z_{LR}$, and $Z_{LL}$), but accuracy at $Z_{LL}$ is not expected. +

@@ -253,4 +254,6 @@ See eq.(7)-(10) in [1] for the updated formula. In addition, eq.(17),(18) from [ ### References + + [1] [Gabrielle Lochrie, Michael Doljevic, Mario Nona, Yongsoon Yoon, Anti-Windup Recursive Least Squares Method for Adaptive Lookup Tables with Application to Automotive Powertrain Control Systems, IFAC-PapersOnLine, Volume 54, Issue 20, 2021, Pages 840-845](https://www.sciencedirect.com/science/article/pii/S240589632102320X) diff --git a/vehicle/raw_vehicle_cmd_converter/src/node.cpp b/vehicle/raw_vehicle_cmd_converter/src/node.cpp index fb0bd00794c52..e45439ecb4d41 100644 --- a/vehicle/raw_vehicle_cmd_converter/src/node.cpp +++ b/vehicle/raw_vehicle_cmd_converter/src/node.cpp @@ -144,7 +144,7 @@ double RawVehicleCommandConverterNode::calculateSteer( double dt = (current_time - prev_time_steer_calculation_).seconds(); if (std::abs(dt) > 1.0) { RCLCPP_WARN_EXPRESSION(get_logger(), is_debugging_, "ignore old topic"); - dt = 0.1; // set ordinaray delta time instead + dt = 0.1; // set ordinary delta time instead } prev_time_steer_calculation_ = current_time; // feed-forward