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

test(motion_utils): add test for path shift #9083

Merged

Conversation

go-sakayori
Copy link
Contributor

Description

Add unit test for motion_utils/path shift.cpp.
image

Related links

#9081

How was this PR tested?

Colcon test

1: [----------] 5 tests from path_shift_test
1: [ RUN      ] path_shift_test.calc_feasible_velocity_from_jerk
1: [WARN] [1728739510.673783775] [autoware_motion_utils.trajectory]: calc_feasible_velocity_from_jerk: Failed to calculate velocity due to invalid arg
1: [WARN] [1728739510.673847757] [autoware_motion_utils.trajectory]: calc_feasible_velocity_from_jerk: Failed to calculate velocity due to invalid arg
1: [       OK ] path_shift_test.calc_feasible_velocity_from_jerk (0 ms)
1: [ RUN      ] path_shift_test.calc_lateral_dist_from_jerk
1: [WARN] [1728739510.673856452] [autoware_motion_utils.trajectory]: calc_lateral_dist_from_jerk: Failed to calculate lateral distance due to invalid arg
1: [WARN] [1728739510.673859362] [autoware_motion_utils.trajectory]: calc_lateral_dist_from_jerk: Failed to calculate lateral distance due to invalid arg
1: [       OK ] path_shift_test.calc_lateral_dist_from_jerk (0 ms)
1: [ RUN      ] path_shift_test.calc_longitudinal_dist_from_jerk
1: [WARN] [1728739510.673864779] [autoware_motion_utils.trajectory]: calc_longitudinal_dist_from_jerk: Failed to calculate lateral distance due to invalid arg
1: [       OK ] path_shift_test.calc_longitudinal_dist_from_jerk (0 ms)
1: [ RUN      ] path_shift_test.calc_shift_time_from_jerk
1: [WARN] [1728739510.673870571] [autoware_motion_utils.trajectory]: calc_shift_time_from_jerk: Failed to calculate lateral distance due to invalid arg
1: [WARN] [1728739510.673880195] [autoware_motion_utils.trajectory]: calc_shift_time_from_jerk: Failed to calculate lateral distance due to invalid arg
1: [       OK ] path_shift_test.calc_shift_time_from_jerk (0 ms)
1: [ RUN      ] path_shift_test.calc_jerk_from_lat_lon_distance
1: [       OK ] path_shift_test.calc_jerk_from_lat_lon_distance (0 ms)
1: [----------] 5 tests from path_shift_test (0 ms total)

Notes for reviewers

Includes changes from preceding PR. Please review the preceding PR first.

Interface changes

None.

Effects on system behavior

None.

go-sakayori and others added 4 commits October 11, 2024 17:14
Signed-off-by: Go Sakayori <gsakayori@gmail.com>
Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>
Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>
Signed-off-by: Go Sakayori <gsakayori@gmail.com>
@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Oct 15, 2024
Copy link

github-actions bot commented Oct 15, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

#ifndef AUTOWARE__MOTION_UTILS__TRAJECTORY__PATH_SHIFT_HPP_
#define AUTOWARE__MOTION_UTILS__TRAJECTORY__PATH_SHIFT_HPP_

#include <cmath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) this include seems unnecessary.

Suggested change
#include <cmath>

Maybe it should be included in the cpp file instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted in eefab5f, and rebased this PR. Could you approve the preceding PR too?

@maxime-clem maxime-clem added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 15, 2024
go-sakayori and others added 4 commits October 15, 2024 09:47
Signed-off-by: Go Sakayori <gsakayori@gmail.com>
Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>
Signed-off-by: Go Sakayori <gsakayori@gmail.com>
Signed-off-by: Go Sakayori <gsakayori@gmail.com>
@go-sakayori go-sakayori force-pushed the test/motion_utils_path_shifter branch from 688f855 to b78c2e5 Compare October 15, 2024 00:50
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.19%. Comparing base (0de8669) to head (81d9b20).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9083      +/-   ##
==========================================
+ Coverage   27.09%   27.19%   +0.10%     
==========================================
  Files        1300     1304       +4     
  Lines       95810    96037     +227     
  Branches    39122    39156      +34     
==========================================
+ Hits        25955    26115     +160     
- Misses      67257    67310      +53     
- Partials     2598     2612      +14     
Flag Coverage Δ *Carryforward flag
differential 27.49% <ø> (?)
total 27.00% <ø> (-0.09%) ⬇️ Carriedforward from b78c2e5

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

@github-actions github-actions bot removed the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Oct 15, 2024
@go-sakayori go-sakayori merged commit bb825f0 into autowarefoundation:main Oct 15, 2024
32 checks passed
@go-sakayori go-sakayori deleted the test/motion_utils_path_shifter branch October 15, 2024 05:12
prakash-kannaiah pushed a commit to prakash-kannaiah/autoware.universe that referenced this pull request Oct 16, 2024
* remove unused function

Signed-off-by: Go Sakayori <gsakayori@gmail.com>

* mover path shifter utils function to autoware motion utils

Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>

* minor change in license header

Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>

* fix warning message

Signed-off-by: Go Sakayori <gsakayori@gmail.com>

* remove header file

Signed-off-by: Go Sakayori <gsakayori@gmail.com>

* add test file

Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>

* add unit test to all function

Signed-off-by: Go Sakayori <gsakayori@gmail.com>

* fix spelling

Signed-off-by: Go Sakayori <gsakayori@gmail.com>

---------

Signed-off-by: Go Sakayori <gsakayori@gmail.com>
Signed-off-by: Go Sakayori <go.sakayori@tier4.jp>
Signed-off-by: prakash-kannaiah <prakashkanan.pk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (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.

3 participants