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

rhw0023's profile - activity

2022-07-12 10:02:35 -0500 received badge  Famous Question (source)
2022-05-11 15:03:41 -0500 received badge  Notable Question (source)
2021-11-10 14:10:16 -0500 received badge  Popular Question (source)
2021-10-29 10:30:45 -0500 marked best answer Use ROS_ info to output std::vector data

If I'm dealing with std::vector data in C++ and I'd like to print it on the output stream I can do something similar to what is shown below:

std::cout << "Data Retrieved: \n";
std::copy(data.begin(), data.end(), std::ostream_iterator<double>(std::cout, " "));
std::cout << std::endl;

How might I reproduce this behavior using ROS_INFO to display the data on the console as new data is received?

Thank you!

2021-10-29 10:30:45 -0500 received badge  Scholar (source)
2021-10-29 10:30:39 -0500 commented answer Use ROS_ info to output std::vector data

This worked out great! Thank you!

2021-10-29 09:12:34 -0500 asked a question Use ROS_ info to output std::vector data

Use ROS_ info to output std::vector data If I'm dealing with std::vector data in C++ and I'd like to print it on the out