[ros-users] Nodelets

Radu Bogdan Rusu rusu at willowgarage.com
Sun Dec 5 22:15:27 UTC 2010


On 12/05/2010 01:56 PM, Josh Faust wrote:
>
>     In general, nodelets should not be abused. If the performance of nodes (copy/(de)serialization) is really what's
>     dragging your processing graph down, then sure, nodelets are offering a viable alternative. However, this should really
>     be profiled first for each application.
>
>
> This isn't entirely true.  Adding processes also means adding threads, which increases context switches/etc.  Having
> everything in a single process means more control over everything.  There's a reason game consoles run a single process,
> and that process generally has # threads == # cores.  I think in the "ideal" world everything that can be a nodelet
> should be, and a fully-debugged application would be a single process running many nodelets.  In practice there are
> likely exceptions (like, say, GUI applications), but overall I think it's a reasonable goal.


Agreed, but though I'm pushing for nodelets (at least in all the perception infrastructure) like crazy, I think having 
multiple processes still makes a lot of sense (whether they should be nodes or nodelets ran in multiple managers, that's 
a different story). Game consoles are not complex robotic systems, and we wouldn't want to have the entire ROS PR2 tree 
start up as a single process, and then when something crashes the whole robot crashes. If my game crashes, I can live 
with that.

Multiple processes can actually act as "guards" too - by separating important levels of functionality. I'm pretty sure 
that an ill-malformed nodelet can easily crash a manager. But sure, I did notice that you said "fully-debugged 
applications" ;) Unfortunately, in my opinion we're still not there... yet.

My point is that different processes are still good enough for our current robotic infrastructure and should be used 
wherever possible if your bottleneck is not the copy/(de)serialization. But sure, ultimately, people are free to use 
whatever they want :)

Speaking of GUIs, it would be really nice to get image_view/rviz/pcd_viewer to have a nodelet component for displaying 
data fast(er). Do you see any drawbacks of nodelets w. GUIs? If not, I might try to do the image_view/pcd_viewer part 
next week as an exercise.

Cheers,
Radu.
--
http://pointclouds.org



More information about the ros-users mailing list