ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
What speaks against doing a normal string write?
#include <fstream>
#include <string>
#include <iostream>
void chatterCallback(const std_msgs::String::ConstPtr& msg)
{
std::ofstream out("output.txt");
out << msg->data.c_str();
out.close();
}