ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Nodelet basics

asked 2018-05-22 04:56:46 -0500

HaroldVD gravatar image

updated 2018-05-22 06:22:48 -0500

Since I want to implement Nodelets into my ROS projects I have the following questions which I cannot find an answer for; One of my projects' nodes has one function which is finding matches in patterns which requires a lot of processing power and it contains many functions with loops and a lot of math stuff. I assume replacing this node with nodelets will improve the performance since it'll take less time to run through the whole code. Is this right?

Can nodelets communicate with other regular nodes? I only need a part of my project (vision analyzing) to be nodelets. Are there any examples of projects available that combine nodes with nodelets?

edit retag flag offensive close merge delete

Comments

Was your edit meant to change your question? Because I believe my answer already covers the current version of your question as well as the previous one.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-22 09:34:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-22 05:06:14 -0500

gvdhoorn gravatar image

updated 2018-05-22 05:25:20 -0500

One of my projects' nodes has one function which is finding matches in patterns which requires a lot of processing power and it contains many functions with loops and a lot of math stuff. I assume replacing this node with nodelets will improve the performance since it'll take less time to run through the whole code. Is this right?

The big advantage of nodelets is that they allow you to communicate using ROS msgs essentially "for free" (ie: msg exchanges become pointer-passing between nodelets running in the same process). This is especially advantageous when you're exchanging large messages frequently (ie: camera images, large point clouds, etc), as the size of the message does not contribute significantly any longer to total time taken to send out and receive a message (pointers are fixed size).

If performance of your "function" is not bound by communication, but by computation, then converting things to nodelets will not improve performance (how could it: your CPU does not get faster all of a sudden, it still has to execute the exact same amount of code).

Can nodelets be combined with regular nodes?

This depends on what you mean by "combined with".

If you're asking: can nodelets exchange messages with nodes, then: yes.

If you're asking: can nodelets be combined (into a single executable fi) with nodes, then no.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-22 04:56:46 -0500

Seen: 391 times

Last updated: May 22 '18