Comments (13)
I fixed build errors and some Eigen-related alignment errors and added build and run tests with the latest PCL. Can you see if
refactor
branch works with PCL 1.11?
Thanks for your hard work,
I just about to report the Eigen related problem which you have nailed.
It works on PCL 1.11.1.
The gicp_align works, through the test app, may need some further tweak.
Thanks again.
from fast_gicp.
Sorry, I met some GPU-related error and needed a bit more time to fix it. I suppose it'll be done next week.
from fast_gicp.
Thanks.
Very appreciate your hard work.
I will follow your lm-cuda branch.
from fast_gicp.
I still have some problems on the GPU version and need more time to make it workable...
from fast_gicp.
I was re-checking the code, and found that it was a termination criteria bug. I pushed the fixed code to lm_cuda
branch. Could you test if it works on your environment?
from fast_gicp.
I was re-checking the code, and found that it was a termination criteria bug. I pushed the fixed code to
lm_cuda
branch. Could you test if it works on your environment?
Hi, I have tried both master and lm_cuda branch with gicp_align. there are two crushes
- fast_gicp::FastVGICP single and mt.
fast_gicp::FastVGICP<pcl::PointXYZ, pcl::PointXYZ>::create_voxelmap(std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&) 0x000055bd6d6b7d12
void test<fast_gicp::FastVGICP<pcl::PointXYZ, pcl::PointXYZ> >(fast_gicp::FastVGICP<pcl::PointXYZ, pcl::PointXYZ>&, std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&, std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&) 0x000055bd6d695301
main 0x000055bd6d68e0f3
__libc_start_main 0x00007f343269cbf7
_start 0x000055bd6d690eca
Signal: SIGSEGV (Segmentation fault)
2.fast_gicp::FastVGICPCuda
still crushed at
__GI___libc_free 0x00007fb57d9c7a6d
fast_gicp::FastVGICPCuda<pcl::PointXYZ, pcl::PointXYZ>::setInputSource(std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&) 0x000056131cbeb799
void test<fast_gicp::FastVGICPCuda<pcl::PointXYZ, pcl::PointXYZ> >(fast_gicp::FastVGICPCuda<pcl::PointXYZ, pcl::PointXYZ>&, std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&, std::shared_ptr<pcl::PointCloudpcl::PointXYZ const> const&) 0x000056131cbdc251
main 0x000056131cbd70f3
__libc_start_main 0x00007fb57d951bf7
_start 0x000056131cbd9d7a
target:17047[pts] source:17334[pts]
--- vgicp_cuda (parallel_kdtree) ---
Signal: SIGSEGV (Segmentation fault)
I have made some changes to make it fit for PCL 1.11.1 (replace boost::shared_ptr with std::shared_ptr)
And since I don't use catin
#add_dependencies(gicp_align ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
#add_dependencies(gicp_kitti ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
commended in cmakelist. Otherwise it gives cmake error for
" add_dependencies called with incorrect number of arguments"
the environment is
ubuntu 18.04.1 with 5.4.0-42-generic
clion with gcc version 7.5.0
PCL 1.11.1
Cuda compilation tools, release 10.2, V10.2.89
I hope it will help.
from fast_gicp.
Thanks for your help. With the PCL installed via apt, this problem didn't reproduce. It seems it has some problems with the latest PCL. I'll add some tests for the latest PCL to fix it.
from fast_gicp.
Thanks for your help. With the PCL installed via apt, this problem didn't reproduce. It seems it has some problems with the latest PCL. I'll add some tests for the latest PCL to fix it.
PCL 1.11+
API changes:
Replace boost::shared_ptr with std::shared_ptr
At your last commit (lm with CPU), I replace boost::shared_ptr with std::shared_ptr, it works fine.
For PCL change details
Starting with PCL 1.11, PCL uses std::shared_ptr and std::weak_ptr instead of the boost smart pointers. The change leverages type aliases included with the 1.10.0 release.
PCL 1.11 also introduces pcl::index_t which should be used for the size of point types instead of int, std::size_t, etc. EOL for deprecated features is also explicitly mentioned in the deprecation compile time warnings
https://github.com/PointCloudLibrary/pcl/blob/master/CHANGES.md#-1110-11052020-
I hope you can make a new branch for PCL 1.11+
consider it still updates frequently.
from fast_gicp.
I fixed build errors and some Eigen-related alignment errors and added build and run tests with the latest PCL. Can you see if refactor
branch works with PCL 1.11?
from fast_gicp.
Hi,@koide3
Could you tell me how to handle the Eigen align problem?
I recently meet this problem, but I don't know how to fix it.
I read from stack flow, It may relate to the SSE CPU alignment. Eigen needs to align memory for 4byte alignment, last time I just enable build compilation -march native in CMake list. It goes away automatically.
But this time before your refactor branch, the Cuda still crush on Eigen align part
How do you fix it?
Any advice or links will be helpful
__GI___libc_free 0x00007f3e8dd41a6d
Eigen::internal::handmade_aligned_free Memory.h:98
Eigen::internal::aligned_free Memory.h:179
Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> >::deallocate Memory.h:763
std::allocator_traits<Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> > >::deallocate alloc_traits.h:328
std::_Vector_base<Eigen::Matrix<float, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> > >::_M_deallocate stl_vector.h:180
std::_Vector_base<Eigen::Matrix<float, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> > >::~_Vector_base stl_vector.h:162
std::vector<Eigen::Matrix<float, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> > >::~vector stl_vector.h:435
fast_gicp::FastVGICPCuda<pcl::PointXYZ, pcl::PointXYZ>::setInputSource fast_vgicp_cuda_impl.hpp:82
test<fast_gicp::FastVGICPCuda<pcl::PointXYZ, pcl::PointXYZ> > align.cpp:58
main align.cpp:176
__libc_start_main 0x00007f3e8dccbbf7
_start 0x0000555f67d0d4da
from fast_gicp.
The cause of the problem was std::make_shared
that uses the standard (non-aligned) allocator by default. An easy workaround was to avoid make_shared
and use new
to create an instance. pcl::make_shared
, which properly uses Eigen::aligned_allocator
, would be a better solution if we don't need to take care of old version of PCL, though.
// AdditiveGaussianVoxel has Eigen variables, and this may cause an alignment error
voxel = std::make_shared<AdditiveGaussianVoxel>();
// This properly calls ALIGNED_OPERATOR_NEW
voxel.reset(new AdditiveGaussianVoxel);
It looks the new error you faced is relating to std::vector
, and we need another workaround. I'll try to reproduce it on my PC.
from fast_gicp.
The cause of the problem was
std::make_shared
that uses the standard (non-aligned) allocator by default. An easy workaround was to avoidmake_shared
and usenew
to create an instance.pcl::make_shared
, which properly usesEigen::aligned_allocator
, would be a better solution if we don't need to take care of old version of PCL, though.// AdditiveGaussianVoxel has Eigen variables, and this may cause an alignment error voxel = std::make_shared<AdditiveGaussianVoxel>(); // This properly calls ALIGNED_OPERATOR_NEW voxel.reset(new AdditiveGaussianVoxel);It looks the new error you faced is relating to
std::vector
, and we need another workaround. I'll try to reproduce it on my PC.
Thanks for the quick reply.
The mentioned problem does not exist in your new branch (refactor). It can reproduce on lm_cuda. With PCL 1.11.1 and replace boost::shared_ptr with std::shared_ptr.
According to your reply, std::make_shared uses the standard (non-aligned) allocator by default.
When the (non-aligned) allocator and aligned allocator are mixed, this kind of problem randomly appears in the object-free process.
Eigen::internal::handmade_aligned_free Memory.h:98
Eigen::internal::aligned_free Memory.h:179
Eigen::aligned_allocator<Eigen::Matrix<float, 3, 3, 0, 3, 3> >::deallocate Memory.h:763
This is my bad. Did not read the following doc carefully. I hope others won't make the same mistake.
= 1.10.0 (19.01.2020) =
Starting with PCL 1.10, to ensure compatibility with future PCL releases, please use pcl::make_shared and the Class::Ptr + Class::ConstPtr type-alias instead of using direct names like {boost, std}::shared_ptr or {boost, std}::make_shared. There is also pcl::shared_ptr which offers the same abstraction for non-PCL types.
from fast_gicp.
Oh, I see.
std::make_shared<>
return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
std::forward<_Args>(__args)...);
pcl::make_shared<>
return std::allocate_shared<T>(Eigen::aligned_allocator<T>(), std::forward<Args> (args)...);
If I need to make an Eigen related object, the last one is preferred.
from fast_gicp.
Related Issues (20)
- Crash while using VGICP
- how to take fast_gicp in my own code? HOT 3
- About NeighborSearchMethod HOT 1
- got "for_each: failed to synchronize" in every position using "thrust::for_each" HOT 2
- doc request: aligned output point cloud must be different from source and target HOT 1
- Registration score gradually diverges. HOT 3
- cudaErrorIllegalAddress: an illegal memory access was encountered HOT 1
- I want getTransformationProbability() function in ndt_cuda HOT 1
- Unexpected Performance: Single-Threaded Faster than Multi-Threaded in Point Cloud Alignment HOT 2
- Why is the **weight** the square root of the number of points? HOT 4
- the calculation of **rho** in step_lm() seems wrong HOT 2
- set step size on ndt_cuda
- Optimization Problem for Fast GICP (OpenMP)
- any bug in ndt_cuda? HOT 1
- core dumped HOT 1
- How to implement the pcl version of GICP?
- can't build fast_gicp.lib HOT 2
- fast_gicp iteration HOT 1
- Fast-gicp DO HOT 1
- Fast-gicp DO NOT HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_gicp.