ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS_INFO macro accepts C-style printf formatting parameters as in this example from "Mastering ROS'":

ROS_INFO("From Client [%s], Server says [%s]",req.in.c_str(),res.out.c_str())

ROS_INFO_STREAM macro accepts C++ style std::iostream formatting as in this example from "A Gentle Introduction to ROS":

ROS_INFO_STREAM("Sending␣random␣ velocity ␣command: " << "␣ linear=" << msg. linear . x << "␣angular=" << msg. angular . z)

ROS_INFO macro accepts C-style printf formatting parameters as in this example from "Mastering ROS'":

ROS_INFO("From Client [%s], Server says [%s]",req.in.c_str(),res.out.c_str()) [%s]", req.in.c_str(), res.out.c_str())

ROS_INFO_STREAM macro accepts C++ style std::iostream formatting as in this example from "A Gentle Introduction to ROS":

ROS_INFO_STREAM("Sending␣random␣ velocity ␣command: " << "␣ linear=" << msg. linear . x << "␣angular=" << msg. angular . z)

click to hide/show revision 3
No.3 Revision

ROS_INFO macro accepts C-style printf formatting parameters as in this example from "Mastering ROS'":

ROS_INFO("From Client [%s], Server says [%s]", req.in.c_str(), res.out.c_str())

ROS_INFO_STREAM macro accepts C++ style std::iostream formatting as in this example from "A Gentle Introduction to ROS":

ROS_INFO_STREAM("Sending␣random␣ ROS_INFO_STREAM("Sending random velocity ␣command: command: " << "␣ linear=" << msg. linear . x << "␣angular=" "angular=" << msg. angular . z)

click to hide/show revision 4
No.4 Revision

ROS_INFO macro accepts C-style printf formatting parameters as in this example from "Mastering ROS'":

ROS_INFO("From Client [%s], Server says [%s]", req.in.c_str(), res.out.c_str())

ROS_INFO_STREAM macro accepts C++ style std::iostream formatting as in this example from "A Gentle Introduction to ROS":

ROS_INFO_STREAM("Sending random velocity command: " << "␣ " linear=" << msg. linear . x << "angular=" << msg. angular . z)