Robotics StackExchange | Archived questions

ROS high performance nodelet CUDA OpenMP OpenCV

Hallo community,

I will start to write a nodelet in ROS that should perform heavy image processing. To utilize the capabilities of modern hardware platforms like Jetson TX2 (GPU, Multicore CPU) I want use CUDA, multithreading and CUDA enabled OpenCV.

Now my question is how to design a nodelet that can receive a depth map and a rgb image (sync with message_filter) and than perform the image processing? In general I think it is a good idea to only perform the receiving process in the message callback and the image processing is than performed outside the callback (see http://answers.ros.org/question/53055/ros-callbacks-threads-and-spinning/).

How to handle the problem that the processing can be slower as the publish rate of the depth and rgb image? The best solution will be to get the newest available messages and ignore all messages as long as the image processing runs. How this kind of behaviour can efficiently be achieved?

Or is it better to have one main thread that receive the images and than transfer it to a number of worker threads with a fixed policy like this for example: image description

How is it possible to use OpenMP or other libraries to speed up the computation by utilizing multiple threads within a ROS nodelet? Perhaps you can name example nodelets where they do nearly the same or name tutorials that cover my problem.

Perhaps my Questions are to general so if more information from my side are necessary, please ask.

Best Regards,

Manuel

Asked by Mondi on 2017-04-13 07:51:40 UTC

Comments

This question is completely open ended and has many sub questions and is unanswerable without more application specific information. Your questions are mostly about general multithreaded software design, using the ROS specific implementations of those primitives.

Asked by tfoote on 2017-04-19 14:57:31 UTC

Answers

No one a idea or a repo where they do nearly the same?

Best Regards,

Manuel

Asked by Mondi on 2017-04-19 08:31:10 UTC

Comments