总共有二十多个宏,我只列出有价值而且容易用的1
2
3
4
5
6
7
ROS_INFO_ONCE
适用于循环内,防止不断产生日志1
2for(int i=0; i<3; i++)
ROS_INFO_ONCE("1111111");
结果只有一个1111111
ROS_INFO_COND
ROS_INFO_COND(2>1, "log here");
ROS_INFO_STREAM
其实就是C++风格的ROS_INFO
:ROS_INFO_STREAM("velocity command: " << " linear=" << msg. linear . x << " angular=" << msg. angular . z)