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

feat(pointcloud_preprocessor): add test for distortion correction node #7293

Conversation

vividf
Copy link
Contributor

@vividf vividf commented Jun 6, 2024

Description

Add Integration testing for the distortion correction node.

  • test empty twist
  • test empty imu
  • test empty pointcloud
  • test normal input without using imu msg
  • test normal input using imu msg

Related links

Tests performed

Build

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select pointcloud_preprocessor

Test

colcon test --packages-select pointcloud_preprocessor --event-handlers console_cohesion+

Notes for reviewers

Interface changes

ROS Topic Changes

ROS Parameter Changes

Effects on system behavior

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@vividf vividf changed the title Feature/add test for distortion correction node feat(pointcloud_preprocessor): add test for distortion correction node Jun 6, 2024
@github-actions github-actions bot added the component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) label Jun 6, 2024
@vividf vividf self-assigned this Jun 12, 2024
@vividf vividf marked this pull request as ready for review June 12, 2024 07:27
@vividf vividf marked this pull request as draft June 12, 2024 07:30
@vividf vividf marked this pull request as ready for review June 12, 2024 07:52
Copy link
Contributor

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

I saw you are addressing directly the data of the pointcloud. In python there are still ways to access pointclouds via iterators. If not that approach, ros2_numpy would be an option, but probably not possible in universe. However, I highly recommend you re write pointcloud related tests to c++

On another note, please avoid using don't and similar abbreviations. They have leaked into other parts where they should not been before

@vividf
Copy link
Contributor Author

vividf commented Jun 17, 2024

@knzo25

Thanks for the review,
I agree that writing C++ tests is better for testing, however, this PR is not a Unit test but an Integration test (which tests the single node instead of the function). Regarding the Integration testing on the Autoware contribution (testing the output of node), it suggests us to write in this way. Therefore, I am not sure that I should spend more time migrating it to the C++ version in this case.

I saw you are addressing directly the data of the pointcloud. In python there are still ways to access pointclouds via iterators. If not that approach, ros2_numpy would be an option, but probably not possible in universe.

For this comment, could you explain more in detail, Thanks!

@knzo25
Copy link
Contributor

knzo25 commented Jun 18, 2024

An integration test is defined as the phase in software testing where individual software modules are combined and tested as a group. Integration tests occur after unit tests, and before validation tests.

The input to an integration test is a set of independent modules that have been unit tested. The set of modules is tested against the defined integration test plan, and the output is a set of properly integrated software modules that is ready for system testing.

Having the briefest of looks your test is a unit test, since anyways the distortion correction has essentially one method

@vividf
Copy link
Contributor Author

vividf commented Jun 19, 2024

This PR is set to draft as we want the gtest instead of the component test.

@vividf vividf marked this pull request as draft June 19, 2024 07:52
@vividf
Copy link
Contributor Author

vividf commented Jul 2, 2024

The unit test is created by another PR #7801
Therefore, this pr will be closed.

@vividf vividf closed this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants