Giving names to messages

By default, ROS assigns several names to the node loggers. The messages discussed until now will be named after the node's name. In complex nodes, we can give a name to those messages of a given module or functionality. This is done with ROS_<LEVEL>[_STREAM]_NAMED functions (see the example2 node):

ROS_INFO_STREAM_NAMED( 
  "named_msg", 
  "My named INFO stream message; val = " <<val 
); 

With named messages, we can set different initial logging levels for each named message using the configuration file and modify them individually later. We must use the name of the messages as children of the package in the specification; for example, for named_msg messages, we will use the following code:

log4j.logger.ros.chapter3_tutorials.named_msg=ERROR 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.98.108