|
|
ROS nodes are essentially equivalent to a "long-running" POSIX process (i.e. continuously looping until killed, not short-lived, one-shot, or a batch process). Generally, they will start up, allocate resources, announce their presence and any topics that they intend to publish or subscribe to and then process messages in a loop until shut down.
|
|
|
|
|
|
ROS client libraries (rospy/roscpp) provide a series of global initialisation subroutines that handle a number of process conventions, such as checking for connectivity to the ROS_MASTER master node and announcing itself and some argument processing for setting parameters (e.g. _param=123), or remapping topics (e.g. /hardcoded_input:=/specified_at_runtime/camera/image_color).
|
|
|
|
|
|
Nodelets are an interface for creating C++ classes, compiling them into shared libraries and dynamically linking them at runtime into a single node process. Communication via topics between nodelets in the same process is intercepted and replaced with IPC in shared memory access, skipping the usual serialisation and network hops. |