Re: [ros-users] Nodelets

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: Radu Bogdan Rusu
CC: User discussions
Subject: Re: [ros-users] Nodelets

On Dec 4, 2010, at 12:14 PM, Radu Bogdan Rusu wrote:

>
> On 12/04/2010 12:12 PM, Nicholas Butko wrote:
>>>
>>>> But, does a nodelet run as standalone basically run just as well as an
>>>> ordinary node? If the overhead of the standalone nodelet is zero in
>>>> terms of speed and small in terms of memory footprint (are those valid
>>>> assumptions?), then creating a node from the beginning as a nodelet
>>>> seems like the way to go as you can easily combine it with a nodelet
>>>> manager down the road, without a recompile.
>>>
>>>
>>> Yup!
>>>
>>
>> Then, is there any advantage to creating nodes as nodes instead of nodelets?
>
> Sure. If a nodelet dies, the entire process might die. Nodes are more "robust", as you can restart/respawn them individually.


Could you achieve the same behavior by having a separate nodelet manager for each nodelet? For example, would it be easy to write a shell script that starts a uniquely named nodelet manager and assigns a single nodelet to it? Call such a script "rosrun_nodelet" for example. Then you could run a single piece of code as a nodelet or a node.

I am thinking of transferring a bunch of my nodes to nodelets, and I guess I want to know what people at WG are finding "best practices" are. Do you find yourself coding every new node as a nodelet, or only when it's absolutely necessary? Are there any good strategies for hybrid nodes/lets? How easy is it to write a main function that "runs" a nodelet as a node?

--Nick