<commit_before>//
//  JSKROSTalkerNode.mm
//  ROSiOS
//
//  Created by FurutaYuki on 1/25/15.
//  Copyright (c) 2015 Furushchev. All rights reserved.
//

#import "JSKROSTalkerNode.h"
#import <sstream>
#import <std_msgs/String.h>

JSKROSTalkerNode::JSKROSTalkerNode()
{
    th_ = new boost::thread(&JSKROSTalkerNode::spin, this);
    pub_ = nh_.advertise<std_msgs::String>("chatter", 1000);
}

JSKROSTalkerNode::~JSKROSTalkerNode()
{
    ros::shutdown();
    th_->join();
    delete th_;
}

void JSKROSTalkerNode::spin()
{
    ros::spin();
}

std::string JSKROSTalkerNode::publish(int count)
{
    std_msgs::String msg;

    std::stringstream ss;
    ss << "hello world " << count;
    msg.data = ss.str();
    
    ROS_INFO("%s", msg.data.c_str());
    
    return msg.data;
}<commit_msg>fix: forgot to publish<commit_after>//
//  JSKROSTalkerNode.mm
//  ROSiOS
//
//  Created by FurutaYuki on 1/25/15.
//  Copyright (c) 2015 Furushchev. All rights reserved.
//

#import "JSKROSTalkerNode.h"
#import <sstream>
#import <std_msgs/String.h>

JSKROSTalkerNode::JSKROSTalkerNode()
{
    th_ = new boost::thread(&JSKROSTalkerNode::spin, this);
    pub_ = nh_.advertise<std_msgs::String>("chatter", 1000);
}

JSKROSTalkerNode::~JSKROSTalkerNode()
{
    ros::shutdown();
    th_->join();
    delete th_;
}

void JSKROSTalkerNode::spin()
{
    ros::spin();
}

std::string JSKROSTalkerNode::publish(int count)
{
    std_msgs::String msg;

    std::stringstream ss;
    ss << "hello world " << count;
    msg.data = ss.str();
    
    pub_.publish(msg);
    
    ROS_INFO("%s", msg.data.c_str());
    
    return msg.data;
}
{'fraction_non_alphanumeric': 0.16924984500929943, 'fraction_numerical': 0.016119032858028518, 'mean_word_length': 3.5210084033613445, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5993837', 'n_tokens_mistral': 683, 'n_tokens_neox': 633, 'n_words': 112}