Rosanswers logo


I want to use pcl and openCV with cuda. I know now that I have to install another version of openCV (since the default version of openCV in ROS kinetic does not include cuda modules) and then call catkin_make -DOpenCV_DIR=... to use the new version. But now I have to use cuda with pcl too, and I have seen that there are no cuda modules in the default ROS installation (same as openCV). Do I need to install pcl outside ROS like with openCV? And then how can I use it?

Thank you.

Originally posted by ipgvl on ROS Answers with karma: 45 on 2019-02-07

Post score: 1

Original comments

Comment by ipgvl on 2019-02-08:
@ahendrix Sorry but don't know why it has to be closed. Since the only thing I want to know is how to use/link pcl with ROS, it is a ROS question. Is it supposed that I have to register all the webs involved to ask any question? If someone wants to answer me, why not to do it here? With all respect.

Comment by ahendrix on 2019-02-08:
PCL is installed outside of ROS, and you question is "how do I compile PCL with cuda support?" I don't expect many users on the ROS forums to know that. You're more likely to get a good answer by asking the PCL community directly.

Comment by ipgvl on 2019-02-11:
Sorry if my question is not clear but what I want to know is if I have to install a version of pcl that contains cuda and how to use with ROS, how to link it with ROS, etc.(I already know how to install cuda and pcl outside) If I wanted to know how to use it outside ROS I would not write it here.

Comment by ahendrix on 2019-02-11:
Sorry; it was unclear from your question that you already know how to build and install PCL with cuda support.


1 Answer 1


Rosanswers logo

ROS treats PCL and OpenCV in much the same way; as third-party packages that are built and installed outside of ROS.

I'm not sure what the exact build flags for ROS will be, but if you build and install a version of PCL with CUDA support, you should be able to use that from your ROS packages.

Note that the same caveats apply to using custom versions of both PCL and OpenCV: you will need to rebuild every ROS package you use that depends on OpenCV or PCL. Otherwise, you can end up with different libraries using different versions of PCL or OpenCV, both linked into the same final binary. When that happens, only one version of PCL is used, and any ABI differences will cause hard-to-debug segfaults.

Originally posted by ahendrix with karma: 47576 on 2019-02-11

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by ipgvl on 2019-02-12:
Ok, thank you!

Comment by joao.aguizo on 2022-03-10:
@ipgvl any success with that approach?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.