Nodes are executables that can communicate with other processes using topics, services, or the Parameter Server. Using nodes in ROS provides us with fault tolerance and separates the code and functionalities making the system simpler. A node must have a unique name in the system. This name is used to permit the node to communicate with another node using its name without ambiguity. A node can be written using different libraries such as roscpp and rospy; roscpp is for C++ and rospy is for Python.

ROS has tools to handle nodes and give us information about it such as rosnode. The tool rosnode is a command-line tool for displaying information about nodes, such as listing the currently running nodes.

  • rosnode info node: This prints information about the node
  • rosnode kill node: This kills a running node or sends a given signal
  • rosnode list: This lists the active nodes
  • rosnode machine hostname: This lists the nodes running on a particular machine or lists the machines
  • rosnode ping node: This tests the connectivity to the node
  • rosnode cleanup: This purges registration information from unreachable nodes