ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
It should be easy to use a std::stringstream
to accomplish what you want. Moreover, it might be a bit cleaner to use ROS_INFO_STREAM
for this particular application. Something like this:
std::stringstream ss;
ss << "Data Retrieved: \n";
std::copy(data.begin(), data.end(), std::ostream_iterator<double>(ss, " "));
ss << std::endl;
ROS_INFO_STREAM(ss.str());