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

NDT_CUDA_D2D #110

Open
qzsrh opened this issue Feb 20, 2023 · 9 comments
Open

NDT_CUDA_D2D #110

qzsrh opened this issue Feb 20, 2023 · 9 comments

Comments

@qzsrh
Copy link

qzsrh commented Feb 20, 2023

when i use the reg_method=NDT_CUDA_D2D, An error has occurred:

terminate called after throwing an instance of 'thrust::system::system_error'
what(): for each:failed to synchronize: cudaErrorIllegalAddress: an illegal memory acess was encountered

The error is located in this step:
//transform pointcloud into odom_child_frame_id
if(this->tf_buffer.canTransform(odom_child_frame_id, pcl_cloud->header.frame_id, stamp, ros::Duration(0.1), &tfError))

But I don't know why it went wrong and how to fix it。
Please help me, thank you very much!

@bigpigdog
Copy link

@qzsrh Hello! Same error as you, did you solve it?

@qzsrh
Copy link
Author

qzsrh commented Dec 19, 2023

@qzsrh Hello! Same error as you, did you solve it?
我把这一部分注释了
if(this->tf_buffer.canTransform(odom_child_frame_id, pcl_cloud->header.frame_id, stamp, ros::Duration(0.1), &tfError))
{
if(!pcl_ros::transformPointCloud(odom_child_frame_id, *pcl_cloud, *cloud, this->tf_buffer)) {
NODELET_ERROR("point cloud cannot be transformed into target frame!!");
return;
}
}else
{
NODELET_ERROR(tfError.c_str());
return;
}

@bigpigdog
Copy link

@qzsrh Thanks for reply!
不过我注释掉了这一段,他刚开始就报错了(难道是我提供了odom -> base_link transform吗)“terminate called after throwing an instance of 'thrust::system::detail::bad_alloc' what(): std::bad_alloc: cudaErrorMemoryAllocation: out of memory”;不同与之前的“cudaErrorIllegalAddress”,之前有这个错误,但他还能运行一段时间。
你是怎么定位你的错误在这一段的呢?

@qzsrh
Copy link
Author

qzsrh commented Dec 19, 2023

不过我注释掉了这一段,他刚开始就报错了(

新的错误大概率是因为参数配置的不合理,点云数据较大匹配计算的时候超出gpu的承受能力了,你可以把downsample_resolution这个参数设置的大一些

@bigpigdog
Copy link

新的错误大概率是因为参数配置的不合理,点云数据较大匹配计算的时候超出gpu的承受能力了,你可以把downsample_resolution这个参数设置的大一些

好像修改downsample_resolution没有什么效果,还是运行会报错,并且那段代码我不能注释掉。
不过还好P2D的运行还算正常,我发现我使用P2D和D2D的使用GPU只占用2%(56MiB),这正常吗

@qzsrh
Copy link
Author

qzsrh commented Dec 19, 2023

新的错误大概率是因为参数配置的不合理,点云数据较大匹配计算的时候超出gpu的承受能力了,你可以把downsample_resolution这个参数设置的大一些

好像修改downsample_resolution没有什么效果,还是运行会报错,并且那段代码我不能注释掉。 不过还好P2D的运行还算正常,我发现我使用P2D和D2D的使用GPU只占用2%(56MiB),这正常吗

取决你的点云地图大小,但只要定位结果正常,问题应该不大

@bigpigdog
Copy link

取决你的点云地图大小,但只要定位结果正常,问题应该不大

那就只能先用P2D算法了,总之谢谢你的解答!

@hwy0606
Copy link

hwy0606 commented Dec 26, 2023

是Eigen版本的冲突问题,fast_gicp/third_party下有一个Eigen,要用这个版本。直接catkin_make编译会用系统里的自带版本。可以先catkin_make --pkg fast_gicp,再全部编译就好了

@bigpigdog
Copy link

是Eigen版本的冲突问题,fast_gicp/third_party下有一个Eigen,要用这个版本。

非常好使!感谢!

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

No branches or pull requests

3 participants