Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing the entire message as String #69

Closed
anasarrak opened this issue Jun 13, 2019 · 1 comment
Closed

Printing the entire message as String #69

anasarrak opened this issue Jun 13, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@anasarrak
Copy link

Is there any way to print the entire message as String as ROS does with stringstream?
Example:

std_msgs::msg::String msg;
std::stringstream ss;
ss << msg;
RCLCPP_INFO(node->get_logger(), "%s\n",ss.str().c_str());
@dirk-thomas dirk-thomas added the duplicate This issue or pull request already exists label Jun 13, 2019
@dirk-thomas
Copy link
Member

Atm there are no streaming operator defined for message. There is a ticket to add various to-string functions though: ros2/rosidl#259

Therefore I will close this ticket as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants