Skip to content

fix(motion_velocity_planner_common): suppress maybe-uninitialized warning on NVIDIA DRIVE AGX Thor#877

Open
veqcc wants to merge 1 commit intoautowarefoundation:mainfrom
veqcc:fix/maybe-uninitialized-on-aarch64
Open

fix(motion_velocity_planner_common): suppress maybe-uninitialized warning on NVIDIA DRIVE AGX Thor#877
veqcc wants to merge 1 commit intoautowarefoundation:mainfrom
veqcc:fix/maybe-uninitialized-on-aarch64

Conversation

@veqcc
Copy link
Contributor

@veqcc veqcc commented Mar 3, 2026

Description

Suppressed maybe-uninitialized warnings.
This error is happening inside boost libraries, which means we cannot avoid the error by explicitly initializing variables.

The whole error message on NVIDIA DRIVE AGX Thor devkit looks as follows:

--- stderr: autoware_motion_velocity_planner_common                                 
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_min_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[0]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
In lambda function,
    inlined from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const boost::geometry::model::polygon<autoware_utils_geometry::Point2d>*, vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > > >; _Funct = autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)::<lambda(const autoware::motion_velocity_planner::Polygon2d&)>]’ at /usr/include/c++/13/bits/stl_algo.h:3833:5,
    inlined from ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’ at /home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:157:16:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:163:34: error: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ may be used uninitialized [-Werror=maybe-uninitialized]
  163 |       rtree.query(bgi::intersects(bbox), std::back_inserter(result_s));
      |                   ~~~~~~~~~~~~~~~^~~~~~
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp: In function ‘pcl::PointCloud<pcl::PointXYZ>::Ptr autoware::motion_velocity_planner::filter_by_multi_trajectory_polygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr&, const std::vector<boost::geometry::model::polygon<autoware_utils_geometry::Point2d>, std::allocator<boost::geometry::model::polygon<autoware_utils_geometry::Point2d> > >&)’:
/home/autoware/autoware/src/core/autoware_core/planning/motion_velocity_planner/autoware_motion_velocity_planner_common/src/planner_data.cpp:159:36: note: ‘bbox.boost::geometry::model::box<boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> >::m_max_corner.boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian>::m_values[1]’ was declared here
  159 |       bg::model::box<BoostPoint2D> bbox;
      |                                    ^~~~
cc1plus: all warnings being treated as errors
gmake[2]: *** [CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/build.make:90: CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/src/planner_data.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/autoware_motion_velocity_planner_common_lib.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< autoware_motion_velocity_planner_common [15.9s, exited with code 2]

Related links

Parent Issue:

  • Link

How was this PR tested?

I have confirmed that the build success on Thor.

Notes for reviewers

The compiler version is

$ g++ --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

Interface changes

None.

Effects on system behavior

None.

…ning on NVIDIA DRIVE AGX Thor

Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
@veqcc veqcc self-assigned this Mar 3, 2026
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@veqcc veqcc added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.33%. Comparing base (d091381) to head (e42d256).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
- Coverage   50.35%   50.33%   -0.02%     
==========================================
  Files         358      360       +2     
  Lines       22780    22795      +15     
  Branches    10120    10120              
==========================================
+ Hits        11472    11475       +3     
- Misses      10203    10215      +12     
  Partials     1105     1105              
Flag Coverage Δ *Carryforward flag
daily-humble 50.73% <ø> (ø) Carriedforward from d091381
daily-jazzy 50.21% <ø> (ø) Carriedforward from d091381
differential-humble 9.97% <ø> (?)
differential-jazzy 9.99% <ø> (?)
total 50.38% <ø> (ø) Carriedforward from d091381
total-humble 50.73% <ø> (ø) Carriedforward from d091381
total-jazzy 50.21% <ø> (ø) Carriedforward from d091381

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@veqcc veqcc removed the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 3, 2026
@soblin
Copy link
Contributor

soblin commented Mar 3, 2026

@veqcc BTW, what's the compiler version ?

@veqcc
Copy link
Contributor Author

veqcc commented Mar 3, 2026

@soblin

what's the compiler version ?

It's 13.3, which I think is the default version on Ubuntu 24.04.

$ g++ --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

@veqcc
Copy link
Contributor Author

veqcc commented Mar 3, 2026

I am sorry that we have to wait the following two PRs to be merged in order to pass GitHub CIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants