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

in what cases nodelets be used?

asked 2018-02-09 04:53:48 -0500

kamalpandey1993 gravatar image

I am working on a ros project in which my publisher node (say x) collects data from camera processes it and sends 7 commands according to the result and my subscriber(say y) receives these seven commands , processes it and gives me the result Could this process be done using nodelets. The important thing is to note that there are only 7 commands but they change according to camera image, so the publisher is sending these 7 commands repetitively but not in any sequence.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-02-09 05:11:11 -0500

gvdhoorn gravatar image

Nodelets are 'just' nodes, but then run in threads instead of processes.

Just about everything you can do with nodes you can do with nodelets, the advantage nodelets have though is that they can directly exchange pointers to msgs -- provided that the nodelets are hosted by the same manager.

So the short answer to your question would likely be: "yes, you can do that with nodelets".

But the question is also a bit of a strange one, as your reason for asking it does not seem to touch on one of the main reasons for using them, which is performance.

Perhaps you can better explain why you are considering using nodelets.

edit flag offensive delete link more

Comments

yes performance is the only reason for my shift towards nodelets but now i am worried as the beaglebone is a single core processor would it be able to make it faster

kamalpandey1993 gravatar image kamalpandey1993  ( 2018-02-09 08:46:59 -0500 )edit
1

If you are publishing camera images it is almost always beneficial to use nodelets. But do understand the consequences of using nodelets (ie: the implicit "you shall not mutate incoming msgs in callbacks" contract).

gvdhoorn gravatar image gvdhoorn  ( 2018-02-09 08:49:38 -0500 )edit

The biggest advantage of nodelets is skipping (de)serialisation. That will lower CPU usage, which is always a good thing, independent of how many cores you have.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-09 08:50:23 -0500 )edit
0

answered 2018-02-09 07:07:48 -0500

Airuno2L gravatar image

I'll refer to an older answer of mine for details

But to summarize it:

A good rule of thumb would be to always use nodes (because they are easier to use, and more flexible) unless you get in a situation where the message passing is too slow for your application and causing problems, then you would consider using nodelets.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-09 04:53:48 -0500

Seen: 276 times

Last updated: Feb 09 '18