Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autoware_behavior_path_planner_common): fix unusedFunction #8654

Merged

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on cppcheck unusedFunction warnings.

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/marker_utils/utils.cpp:344:0: style: The function 'createDrivableLanesMarkerArray' is never used. [unusedFunction]
MarkerArray createDrivableLanesMarkerArray(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp:625:0: style: The function 'calcCenterOfGeometry' is never used. [unusedFunction]
[[maybe_unused]] geometry_msgs::msg::Point calcCenterOfGeometry(const Polygon2d & obj_poly)
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/parking_departure/utils.cpp:107:0: style: The function 'updateSafetyCheckTargetObjectsData' is never used. [unusedFunction]
void updateSafetyCheckTargetObjectsData(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/path_utils.cpp:212:0: style: The function 'getPathTurnSignal' is never used. [unusedFunction]
std::pair<TurnIndicatorsCommand, double> getPathTurnSignal(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/path_utils.cpp:434:0: style: The function 'isCloseToPath' is never used. [unusedFunction]
bool isCloseToPath(const PathWithLaneId & path, const Pose & pose, const double distance_threshold)
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/path_utils.cpp:582:0: style: The function 'getFirstStopPoseFromPath' is never used. [unusedFunction]
std::optional<Pose> getFirstStopPoseFromPath(const PathWithLaneId & path)
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:102:0: style: The function 'getDistanceBetweenPredictedPaths' is never used. [unusedFunction]
double getDistanceBetweenPredictedPaths(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:124:0: style: The function 'getDistanceBetweenPredictedPathAndObject' is never used. [unusedFunction]
double getDistanceBetweenPredictedPathAndObject(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:149:0: style: The function 'checkCollisionBetweenPathFootprintsAndObjects' is never used. [unusedFunction]
bool checkCollisionBetweenPathFootprintsAndObjects(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:252:0: style: The function 'calcObjectsDistanceToPath' is never used. [unusedFunction]
std::vector<double> calcObjectsDistanceToPath(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:460:0: style: The function 'containsGoal' is never used. [unusedFunction]
bool containsGoal(const lanelet::ConstLanelets & lanes, const lanelet::Id & goal_id)
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:769:0: style: The function 'getIds' is never used. [unusedFunction]
std::vector<lanelet::Id> getIds(const lanelet::ConstLanelets & lanelets)
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:1028:0: style: The function 'getTargetLaneletPolygons' is never used. [unusedFunction]
std::vector<Polygon2d> getTargetLaneletPolygons(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:1167:0: style: The function 'setDecelerationVelocity' is never used. [unusedFunction]
PathWithLaneId setDecelerationVelocity(
^

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/utils.cpp:1638:0: style: The function 'convertToSnakeCase' is never used. [unusedFunction]
std::string convertToSnakeCase(const std::string & input_str)
^

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Aug 28, 2024
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@kobayu858 kobayu858 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 28, 2024
@kobayu858 kobayu858 requested a review from veqcc August 28, 2024 07:08
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.12%. Comparing base (2f4a26a) to head (ba88409).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8654      +/-   ##
==========================================
+ Coverage   24.10%   24.12%   +0.02%     
==========================================
  Files        1399     1405       +6     
  Lines      102414   102322      -92     
  Branches    38917    38852      -65     
==========================================
  Hits        24690    24690              
+ Misses      75212    75120      -92     
  Partials     2512     2512              
Flag Coverage Δ *Carryforward flag
differential 15.04% <ø> (?)
total 24.13% <ø> (+0.03%) ⬆️ Carriedforward from 2f4a26a

*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.

@kobayu858 kobayu858 merged commit 7011ea1 into autowarefoundation:main Aug 28, 2024
41 checks passed
a-maumau pushed a commit to a-maumau/autoware.universe that referenced this pull request Sep 2, 2024
…arefoundation#8654)

* fix:unusedFunction 0-2

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:unusedFunction 3-5

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:unusedFunction

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

---------

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
ktro2828 pushed a commit to ktro2828/autoware.universe that referenced this pull request Sep 18, 2024
…arefoundation#8654)

* fix:unusedFunction 0-2

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:unusedFunction 3-5

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

* fix:unusedFunction

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>

---------

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
@kobayu858 kobayu858 deleted the fix/cppcheck_unusedFunction_pla-20 branch October 1, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants