Compiling ROS with OpenCL

asked 2016-08-19 02:23:43 -0500

dmeiicsh gravatar image

Hi there,

I am relatively new to ROS and OpenCL. I am using Linux Ubuntu 14.04, ROS Indigo and OpenCL is running on the NVIDIA computing SDK. I have a ROS publisher and subscriber, and the publisher is sending a bool to the the subscriber, compiling this using catkin_make works fine. Also, I have two OpenCL functions AddVec.cpp and AddVecKernel.cl, which add two vectors (without user input) in OpenCL. I can compile my openCL code using:

g++ -I ~/NVIDIA_GPU_Computing_SDK/OpenCL/common/inc -L ~/NVIDIA_GPU_Computing_SDK/OpenCL/common/lib/Linux64 -o addVec AddVec.cpp -lOpenCL

What I would like to do is insert/include the OpenCL part into the subscriber, such that when receiving the bool from the publisher, I want the subscriber to add the two vectors. However, I have not come up with a solution to compile this and receive the wanted result.

Has anybody experience in using OpenCL with ROS and can help me out? Many thanks in advance!

edit retag flag offensive close merge delete

Comments

1

ROS uses catkin to build nodes, which is basically CMake. You should be able to find lots of information on how to build OpenCL programs/fragments with CMake, which you could then directly use to do the same with catkin.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-19 06:28:36 -0500 )edit