ROS2 cannot import name 'iou3d_nms_cuda'

59 views Asked by At

I am new to use ROS in my project. I have installed ROS2 humble on Ubuntu 22.04. I have successfully tested my python deep learning code (Not a ROS node) for Pointcloud object detection using anaconda. When I use print(torch.version.cuda) on spyder, I get 11.7.

I created a ROS2 python subscriber for deep learning 3D object detection. I used sys.path.insert(0,r'/home/user/MachinLearning/') to add the directory of all deep learning codes/modules to my subscriber node.

For cuda version, When I use nvcc --version, I get this:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

For the subscriber node, When I use ros2 run object_detection listener, I get this error (iou3d_nms_cuda is in MachinLearning folder):

    from . import iou3d_nms_cuda
ImportError: cannot import name 'iou3d_nms_cuda' from 'ops.iou3d_nms' (unknown location)
[ros2run]: Process exited with failure 1

How can I solve this issue?

0

There are 0 answers