PointCloudLibrary / PointCloudLibrary/pcl
Problem in 4PCS implementation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
-
at https://github.com/PointCloudLibrary/pcl/blob/master/registration/include/pcl/registration/ia_fpcs.h#L97
typedef std::vector <MatchingCandidate> MatchingCandidates;
Currently an assert is triggered inside Eigen when the vector allocates storage. MatchingCandidate contains an Eigen::Matrix4f member, which must be aligned at a 16-byte boundary. The fix is to use Eigen::aligned_allocator for the vector:
typedef std::vector <MatchingCandidate, Eigen::aligned_allocator<MatchingCandidate> > MatchingCandidates;
For details see http://eigen.tuxfamily.org/dox-devel/group__TopicStlContainers.html -
at https://github.com/PointCloudLibrary/pcl/blob/master/registration/include/pcl/registration/impl/ia_fpcs.hpp#L181
`#ifdef _OPENMPpragma omp flush (abort)
endif
MatchingCandidates candidates (1);`
Although this is valid, a compiler bug in VC++ 2015 will prevent compilation with OpenMP enabled:
https://stackoverflow.com/questions/35568653/why-doesnt-this-compile-vc-2015-pragma-omp-flush
A solution (other than waiting till Microsoft fix their broken compiler) would be to add a semicolon below the #pragma and above the declaration, with a comment indicating its purpose.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at registration/include/pcl/registration/ia_fpcs.h around line 97 and registration/include/pcl/registration/impl/ia_fpcs.hpp around line 181. Review the Eigen alignment requirement and the VC++ 2015 OpenMP pragma behavior described in the issue. Done means the MatchingCandidates vector uses aligned allocation and the affected code compiles with OpenMP enabled on VC++ 2015.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100