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(autoware_utils): port unit tests from autoware.universe #28

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

storrrrrrrrm
Copy link

@storrrrrrrrm storrrrrrrrm commented Feb 11, 2025

Description

add unit test based on new function and namespace name

How was this PR tested?

Notes for reviewers

None.

Effects on system behavior

None.

JianKangEgon and others added 22 commits January 15, 2025 18:02
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
… same namespace will cause compile error when triggering template specilization

Signed-off-by: NorahXiong <norah.xiong@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
…updated in further version

Signed-off-by: JianKangEgon <egon.kang@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Copy link

github-actions bot commented Feb 11, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

@storrrrrrrrm storrrrrrrrm changed the title Add ut test: add ut Feb 11, 2025
@esteve esteve changed the title test: add ut test(autoware_utils): port unit tests from autoware.universe Mar 17, 2025
@esteve
Copy link
Contributor

esteve commented Mar 17, 2025

@storrrrrrrrm please avoid using shortened words, it wasn't until I read the code changes that I realized that "ut" meant "unit test". I've renamed this PR to follow our naming conventions, please update the description of this PR to be more explanatory.

suchang added 2 commits March 18, 2025 14:47
Signed-off-by: suchang <chang.su@autocore.ai>
@mitsudome-r
Copy link
Member

Takagi-san has splitted some codes in autoware_utils into smaller packages. Is it possible to update your PR to place the tests in appropriate package?

suchang and others added 7 commits March 24, 2025 17:12
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
@liuXinGangChina
Copy link
Contributor

Takagi-san has splitted some codes in autoware_utils into smaller packages. Is it possible to update your PR to place the tests in appropriate package?

Morning mits san

We have been doing the unit test spliting since those spliting prs merged.
And we are about to finish all the unit spliting now

Best regards

心刚

storrrrrrrrm and others added 3 commits March 25, 2025 14:52
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Signed-off-by: suchang <chang.su@autocore.ai>
Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM. I have confirmed that the added tests pass.

colcon test --event-handlers=console_cohesion+ --packages-select autoware_utils_geometry | grep OK
1: [       OK ] alt_geometry.area (0 ms)
1: [       OK ] alt_geometry.convexHull (0 ms)
1: [       OK ] alt_geometry.correct (0 ms)
1: [       OK ] alt_geometry.coveredBy (0 ms)
1: [       OK ] alt_geometry.disjoint (0 ms)
1: [       OK ] alt_geometry.distance (0 ms)
1: [       OK ] alt_geometry.intersects (0 ms)
1: [       OK ] alt_geometry.isAbove (0 ms)
1: [       OK ] alt_geometry.isClockwise (0 ms)
1: [       OK ] alt_geometry.touches (0 ms)
1: [       OK ] alt_geometry.within (0 ms)
1: [       OK ] alt_geometry.areaRand (4 ms)
1: [       OK ] alt_geometry.convexHullRand (6 ms)
1: [       OK ] alt_geometry.coveredByRand (255 ms)
1: [       OK ] alt_geometry.disjointRand (119 ms)
1: [       OK ] alt_geometry.intersectsRand (108 ms)
1: [       OK ] alt_geometry.touchesRand (250 ms)
1: [       OK ] alt_geometry.withinPolygonRand (221 ms)
1: [       OK ] geometry.envelope (0 ms)
1: [       OK ] geometry.simplify (0 ms)
1: [       OK ] geometry.get_point (0 ms)
1: [       OK ] geometry.get_pose (0 ms)
1: [       OK ] geometry.get_longitudinal_velocity (0 ms)
1: [       OK ] geometry.set_pose (0 ms)
1: [       OK ] geometry.set_orientation (0 ms)
1: [       OK ] geometry.set_longitudinal_velocity (0 ms)
1: [       OK ] geometry.create_point (0 ms)
1: [       OK ] geometry.create_quaternion (0 ms)
1: [       OK ] geometry.create_translation (0 ms)
1: [       OK ] geometry.create_quaternion_from_rpy (0 ms)
1: [       OK ] geometry.create_quaternion_from_yaw (0 ms)
1: [       OK ] geometry.calc_elevation_angle (0 ms)
1: [       OK ] geometry.calc_azimuth_angle (0 ms)
1: [       OK ] geometry.calc_distance2d (0 ms)
1: [       OK ] geometry.calc_squared_distance2d (0 ms)
1: [       OK ] geometry.calc_distance3d (0 ms)
1: [       OK ] geometry.get_rpy (0 ms)
1: [       OK ] geometry.get_rpy_wrapper (0 ms)
1: [       OK ] geometry.transform2pose (0 ms)
1: [       OK ] geometry.pose2transform (0 ms)
1: [       OK ] geometry.point_2_tf_vector (0 ms)
1: [       OK ] geometry.transform_point (0 ms)
1: [       OK ] geometry.transform_pose (0 ms)
1: [       OK ] geometry.inverse_transform_pose (0 ms)
1: [       OK ] geometry.inverse_transform_point (0 ms)
1: [       OK ] geometry.transform_vector (0 ms)
1: [       OK ] geometry.calc_curvature (0 ms)
1: [       OK ] geometry.calc_offset_pose (0 ms)
1: [       OK ] geometry.is_driving_forward (0 ms)
1: [       OK ] geometry.calc_interpolated_point (0 ms)
1: [       OK ] geometry.calc_interpolated_pose (0 ms)
1: [       OK ] geometry.calc_interpolated_pose_with_Spherical_Interpolation (0 ms)
1: [       OK ] geometry.getTwist (0 ms)
1: [       OK ] geometry.getTwistNorm (0 ms)
1: [       OK ] geometry.is_twist_covariance_valid (0 ms)
1: [       OK ] geometry.intersect (0 ms)
1: [       OK ] geometry.intersectPolygonRand (91 ms)
1: [       OK ] geometry.PolygonTriangulation (0 ms)
1: [       OK ] geometry.intersectPolygonWithHoles (0 ms)
1: [       OK ] geometry.intersectConcavePolygonRand (115 ms)
1: [       OK ] geometry.get_point_PathWithLaneId (0 ms)
1: [       OK ] geometry.get_pose_PathWithLaneId (0 ms)
1: [       OK ] geometry.get_longitudinal_velocity_PathWithLaneId (0 ms)
1: [       OK ] geometry.set_pose_PathWithLaneId (0 ms)
1: [       OK ] geometry.set_longitudinal_velocity_PathWithLaneId (0 ms)
1: [       OK ] geometry.pose_deviation (0 ms)
1: [       OK ] boost_geometry.boost_geometry_distance (0 ms)
1: [       OK ] boost_geometry.to_3d (0 ms)
1: [       OK ] boost_geometry.to_2d (0 ms)
1: [       OK ] boost_geometry.to_msg (0 ms)
1: [       OK ] boost_geometry.from_msg (0 ms)
1: [       OK ] boost_geometry.boost_is_clockwise (0 ms)
1: [       OK ] boost_geometry.boost_inverse_clockwise (0 ms)
1: [       OK ] boost_geometry.boost_rotate_polygon (0 ms)
1: [       OK ] boost_geometry.boost_to_polygon2d (0 ms)
1: [       OK ] boost_geometry.boost_to_footprint (0 ms)
1: [       OK ] boost_geometry.boost_get_area (0 ms)
1: [       OK ] boost_geometry.boost_expand_polygon (0 ms)
colcon test --event-handlers=console_cohesion+ --packages-select autoware_utils_pcl | grep OK
1: [       OK ] system.transform_point_cloud (0 ms)
1: [       OK ] system.empty_point_cloud (0 ms)

@liuXinGangChina
Copy link
Contributor

Kondo san @youtalk

Although this is a unit test porting task, I hope you can help review when you have time

Thanks

心刚

@isamu-takagi
Copy link
Contributor

@esteve Could you please review again and update the change request?

Copy link
Contributor

@esteve esteve left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

8 participants