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

Bug in EIGEN_ALIGN16 #157

Closed
veqcc opened this issue Jun 1, 2024 · 4 comments · Fixed by #166
Closed

Bug in EIGEN_ALIGN16 #157

veqcc opened this issue Jun 1, 2024 · 4 comments · Fixed by #166

Comments

@veqcc
Copy link

veqcc commented Jun 1, 2024

There is a known bug in EIGEN_ALIGN16 in PCL: https://github.com/leggedrobotics/tensorflow-cpp/blob/master/ISSUES.md

Due to the bug, the clang-tidy make the following CRITICAL warning

expected ';' after struct
'alignas' attribute only applies to variables, data members and tag types

in https://github.com/tier4/nebula/blob/main/nebula_common/include/nebula_common/point_types.hpp

struct PointXYZIR
{
  PCL_ADD_POINT4D;
  float intensity;
  uint16_t ring;
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;
...
struct PointXYZIRADT
{
  PCL_ADD_POINT4D;
  float intensity;
  uint16_t ring;
  float azimuth;
  float distance;
  uint8_t return_type;
  double time_stamp;
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

Could you avoid the bug?

@mojomex
Copy link
Collaborator

mojomex commented Jun 1, 2024

Hi, thanks for bringing attention to this!

This is a known issue - I would love to use all the Clang tooling for Nebula - but even when fixing this, I found that transport_drivers also does not compile with Clang so I gave up for the time being. I will look into this some time in the near future. If you want a fix now, please feel free to PR 🙇‍♂️

@veqcc
Copy link
Author

veqcc commented Jun 2, 2024

@mojomex
Thank you for your quick reply!!

My first concern is whether the struct PointXYZIR and PointXYZIRADT are aligned, in spite of the pcl bug?

If they are NOT aligned, it should be solved soon.

If they are aligned, then I think we have two options:

  1. use pcl>=v1.10.0
    It is reccomnended here: https://github.com/leggedrobotics/tensorflow-cpp/blob/master/ISSUES.md
  2. do nothing for now, and look into in some future as you say

@veqcc
Copy link
Author

veqcc commented Jun 7, 2024

May I close it?

@mojomex
Copy link
Collaborator

mojomex commented Jun 7, 2024

@veqcc The fix is currently merged into develop, we'll close the issue once it is merged into main!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants