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(lidar_transfusion): intensity as uint8 and tests #7745

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

Conversation

amadeuszsz
Copy link
Contributor

@amadeuszsz amadeuszsz commented Jun 28, 2024

Description

This PR updates intensity field as it's considered in new Autoware point clouds format. New unit tests cover this change.

Related links

Parent Issue:

Parent PR:

How was this PR tested?

  • Rosbag input --> no behavior changes observed
  • Unit tests

Notes for reviewers

Changes from parent PR are required to build & test this PR.

Interface changes

Now the input point cloud has to contain uint8 intensity field.

Effects on system behavior

None.

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Jun 28, 2024
Copy link

github-actions bot commented Jun 28, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@amadeuszsz amadeuszsz self-assigned this Jun 28, 2024
@amadeuszsz amadeuszsz added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 28, 2024
@knzo25
Copy link
Contributor

knzo25 commented Jul 2, 2024

@amadeuszsz
Now that we use more pointer algebra for the preprocessing, we are very prone to make mistakes with the data layout.
I am going to do something similar in centerpoint, but can you add some static_assert to make sure that the point steps and offsets match the autoware defined ones?

I did something similar here:
https://github.com/knzo25/cuda_pointcloud_preprocessor/blob/23642f53e8136f45d0ee17ac25dbae05921f79da/include/cuda_pointcloud_preprocessor/cuda_pointcloud_preprocessor_node.hpp#L28-L55
(no need to so exactly the same)

@knzo25
Copy link
Contributor

knzo25 commented Jul 2, 2024

Note:
This PR should only be merged after (or together) with
#6996

@amadeuszsz
Copy link
Contributor Author

@amadeuszsz Now that we use more pointer algebra for the preprocessing, we are very prone to make mistakes with the data layout. I am going to do something similar in centerpoint, but can you add some static_assert to make sure that the point steps and offsets match the autoware defined ones?

I did something similar here: https://github.com/knzo25/cuda_pointcloud_preprocessor/blob/23642f53e8136f45d0ee17ac25dbae05921f79da/include/cuda_pointcloud_preprocessor/cuda_pointcloud_preprocessor_node.hpp#L28-L55 (no need to so exactly the same)

FYI we already checking first input cloud and comparing with the reference.
The difference is in Transfusion we compare input cloud with structure which is assumed further by kernels. Centerpoint, as I noticed in your provided code, compares autoware point types with structure. I think we should do first to inform unaware user about wrong input and second option as well to track API changes. I will add proposed change for sure, thanks!
We are slowly going towards necessity of perception_common package 😄

@knzo25
Copy link
Contributor

knzo25 commented Jul 2, 2024

🙈
I understand that you are comparing it with the reference, which looks perfect. However, the reference itself has magic numbers and would be prone to errors.

For example,
https://github.com/autowarefoundation/autoware.universe/blob/36e54e0b5210aed913ae1a7dd463128c700bd1ba/perception/lidar_transfusion/include/lidar_transfusion/utils.hpp#L56C1-L72C4
Uses datatype=7. In this case sensor_msgs::msg::PointField::FLOAT32 would be better IMO

@knzo25
Copy link
Contributor

knzo25 commented Jul 2, 2024

@amadeuszsz
The branch is not compiling due to the use of PointXYZIRCAEDT that will be introduced in the before-mentioned PR.
Should we leave this as a draft for now? Or do you have other way you would like to proceed with?

@amadeuszsz amadeuszsz removed the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 2, 2024
@amadeuszsz
Copy link
Contributor Author

@amadeuszsz The branch is not compiling due to the use of PointXYZIRCAEDT that will be introduced in the before-mentioned PR. Should we leave this as a draft for now? Or do you have other way you would like to proceed with?

Removing tag:run-build-and-test-differential should be enough for now. I suggest to continue review this PR (my near fixes) before merging parent PR. Then this PR will be already reviewed and ready to merge alongside with parent PR.

@knzo25
Copy link
Contributor

knzo25 commented Jul 2, 2024

@amadeuszsz The branch is not compiling due to the use of PointXYZIRCAEDT that will be introduced in the before-mentioned PR. Should we leave this as a draft for now? Or do you have other way you would like to proceed with?

Removing tag:run-build-and-test-differential should be enough for now. I suggest to continue review this PR (my near fixes) before merging parent PR. Then this PR will be already reviewed and ready to merge alongside with parent PR.

Sorry, I did not understand what you meant. Btw, what failed to compile was a local build in my PC

‘PointXYZIRADRT’?
   53 |     autoware_point_types::PointXYZIRCAEDT, autoware_point_types::PointXYZIRCAEDTGenerator>
      |                           ^~~~~~~~~~~~~~~
      |                           PointXYZIRADRT
autoware/universe/perception/lidar_transfusion/test/test_voxel_generator.cpp:53:66: error: ‘PointXYZIRCAEDTGenerator’ is not a member of ‘autoware_point_types’; did you mean ‘PointXYZIRADRTGenerator’?
   53 |     autoware_point_types::PointXYZIRCAEDT, autoware_point_types::PointXYZIRCAEDTGenerator>
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                  PointXYZIRADRTGenerator

@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Jul 2, 2024
@amadeuszsz
Copy link
Contributor Author

@amadeuszsz The branch is not compiling due to the use of PointXYZIRCAEDT that will be introduced in the before-mentioned PR. Should we leave this as a draft for now? Or do you have other way you would like to proceed with?

Removing tag:run-build-and-test-differential should be enough for now. I suggest to continue review this PR (my near fixes) before merging parent PR. Then this PR will be already reviewed and ready to merge alongside with parent PR.

Sorry, I did not understand what you meant.

If we switch this PR to draft, the review will take place after merge of parent PR.
If we keep this PR open and review it before merge parent PR, we will merge both PR at the same time.

Btw, what failed to compile was a local build in my PC

‘PointXYZIRADRT’?
   53 |     autoware_point_types::PointXYZIRCAEDT, autoware_point_types::PointXYZIRCAEDTGenerator>
      |                           ^~~~~~~~~~~~~~~
      |                           PointXYZIRADRT
autoware/universe/perception/lidar_transfusion/test/test_voxel_generator.cpp:53:66: error: ‘PointXYZIRCAEDTGenerator’ is not a member of ‘autoware_point_types’; did you mean ‘PointXYZIRADRTGenerator’?
   53 |     autoware_point_types::PointXYZIRCAEDT, autoware_point_types::PointXYZIRCAEDTGenerator>
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                  PointXYZIRADRTGenerator

My fault, I should leave a note that this PR required changes from parent PR. Required changes are not included since parent PR is still under development. For time being I'm using autoware_point_types and pointcloud_preprocessor from parent PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants