autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1.01k stars 650 forks source link

refactor(autoware_motion_utils): refactor interpolator #8931

Closed yhisaki closed 1 month ago

yhisaki commented 1 month ago

Description

This PR contains 3 changes.

  1. Rename axis to bases
  2. Move the builder inside the interpolator class
    • before
      auto interpolator = *InterpolatorCreator<Linear>().set_axis(axis).set_values(values).create();
    • after
      auto interpolator = *Linear::Builder{}.set_bases(bases).set_values(values).build();
  3. Change the type of bases(axis) from Eigen::VectorXd to std::vector.

Related links

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

github-actions[bot] commented 1 month ago

Thank you for contributing to the Autoware project!

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

Please ensure:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 74.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 28.04%. Comparing base (583d856) to head (3f6d315). Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
...ntainer/interpolator/detail/interpolator_mixin.hpp 55.55% 3 Missing and 1 partial :warning:
...erpolator/detail/interpolator_common_interface.hpp 70.00% 0 Missing and 3 partials :warning:
...trajectory_container/interpolator/akima_spline.cpp 71.42% 2 Missing :warning:
...trajectory_container/interpolator/cubic_spline.cpp 77.77% 2 Missing :warning:
...s/src/trajectory_container/interpolator/linear.cpp 66.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8931 +/- ## ========================================== + Coverage 28.02% 28.04% +0.02% ========================================== Files 1317 1319 +2 Lines 98557 98590 +33 Branches 39753 39772 +19 ========================================== + Hits 27618 27647 +29 + Misses 70867 70866 -1 - Partials 72 77 +5 ``` | [Flag](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8931/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [differential](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8931/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `25.98% <74.00%> (?)` | | | | [total](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8931/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `28.01% <ø> (-0.02%)` | :arrow_down: | Carriedforward from [583d856](https://app.codecov.io/gh/autowarefoundation/autoware.universe/commit/583d85678e05ac52251cc07f6aa6ec908c8a748a?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.