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(map): add pointcloud divider and pointcloud merger #100

Merged

Conversation

anhnv3991
Copy link
Contributor

Description

  • Added pointcloud divider and pointcloud merger with modified classes for reading/writing PCD with minimize memory requirements
  • Reworked parameters: move parameters to YAML file and added schema.json files
  • Added launch files (py and xml)

Tests performed

  • To test the pointcloud divider, run the below command.
$ ros2 launch autoware_pointcloud_divider pointcloud_divider.launch.xml input_pcd_or_dir:=<path_to_input_PCD_folder_or_PCD_file> output_pcd_dir:=<path_to_output_PCD_folder> prefix:=<prefix_for_output_PCDs>
  • To test the pointcloud merger, run the below command.
$ ros2 launch autoware_pointcloud_merger pointcloud_merger.launch.xml input_pcd_dir:=<path_to_the_input_PCD_folder> output_pcd:=<path_to_the_merged_PCD_file>
  • The memory consumption should not exceed 3GB

Notes for reviewers

  • Currently these tools only support XYZ or XYZI PCD files. Other format like XYZRGB are not supported.
  • The default point type for readding/writing PCD files is pcl::PointXYZI. To change the point type please go to the YAML file at config/ and change point_type: to "point_xyz" or "point_xyzi" (string type).
  • Other parameters (like the segmentation resolution or downsampling resolution) are also specified via YAML files.

Interface changes

  • Parameters are all moved to YAML file and tools are launched via ros2 launch instead of shell scripts like MapIV's tools.

Effects on system behavior

None

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.

anhnv3991 and others added 19 commits July 24, 2024 17:06
Signed-off-by: Anh Nguyen <[email protected]>
Signed-off-by: Anh Nguyen <[email protected]>
Signed-off-by: Anh Nguyen <[email protected]>
Signed-off-by: Anh Nguyen <[email protected]>
Signed-off-by: Anh Nguyen <[email protected]>
Signed-off-by: Anh Nguyen <[email protected]>
This was referenced Aug 16, 2024
Signed-off-by: Anh Nguyen <[email protected]>
@anhnv3991 anhnv3991 changed the title feat(map): Add pointcloud divider and pointcloud merger feat(map): add pointcloud divider and pointcloud merger Aug 16, 2024
@anhnv3991
Copy link
Contributor Author

@SakodaShintaro Thank you for reviewing the point cloud divider.
Regarding this problem

I tried pointcloud_divider to nishishinjuku_map.
It was very slower than the old pointcloud_divider.
Is there any big difference from the old one?

I found a problem with the code. The file you shared is a bit different from usual PCD files. Its header look like this

FIELDS intensity _ x y z _
SIZE 4 1 4 4 4 1
TYPE F U F F F U
COUNT 1 12 1 1 1 4

A typical PCD's header often looks like this

FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 1

I don't know how your file was created but the order of point fields was changed, and there is some padding bytes (fields "_"). My PCD reader did not expected those thing previously. I modified the code to address those fields, and the code should work now.

@anhnv3991 anhnv3991 merged commit 7564237 into autowarefoundation:main Sep 4, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants