<commit_before>#include <ros/ros.h>
#include <pcl_ros/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/octree/octree.h>
#include <vector>
#include <pcl/filters/voxel_grid.h>
#include <boost/foreach.hpp>
#include <ros/console.h>
#include <pcl/filters/extract_indices.h>
#include "std_msgs/Int64.h"

typedef pcl::PointCloud<pcl::PointXYZ> PointCloud;
float resolution = 1.0f;
pcl::octree::OctreePointCloudChangeDetector<pcl::PointXYZ> octree (resolution);
ros::Publisher pub;

void callback(const PointCloud::ConstPtr& msg)
{
  pcl::ExtractIndices<pcl::PointXYZ> extract;
  ROS_INFO("Cloud: width = %d, height = %d", msg->width, msg->height);
  octree.switchBuffers();
  octree.setInputCloud(msg);
  octree.addPointsFromInputCloud();
  std::vector<int> newPointIdxVector;
  octree.getPointIndicesFromNewVoxels(newPointIdxVector);
  ROS_INFO("Indices_changed = %lu", newPointIdxVector.size());
  std_msgs::Int64 msg_publish;
  msg_publish.data = newPointIdxVector.size();
  pub.publish(msg_publish);

}

int main(int argc, char** argv)
{
  ros::init(argc, argv, "change_viewer");
  ros::NodeHandle nh;
  ros::Subscriber sub = nh.subscribe<PointCloud>("/satellite1/sd/points", 1, callback);
  pub = nh.advertise<std_msgs::Int64>("commotion",10);
  ros::spin();
}<commit_msg>Changed topicname in change_viewer<commit_after>#include <ros/ros.h>
#include <pcl_ros/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/octree/octree.h>
#include <vector>
#include <pcl/filters/voxel_grid.h>
#include <boost/foreach.hpp>
#include <ros/console.h>
#include <pcl/filters/extract_indices.h>
#include "std_msgs/Int64.h"

typedef pcl::PointCloud<pcl::PointXYZ> PointCloud;
float resolution = 1.0f;
pcl::octree::OctreePointCloudChangeDetector<pcl::PointXYZ> octree (resolution);
ros::Publisher pub;

void callback(const PointCloud::ConstPtr& msg)
{
  pcl::ExtractIndices<pcl::PointXYZ> extract;
  ROS_INFO("Cloud: width = %d, height = %d", msg->width, msg->height);
  octree.switchBuffers();
  octree.setInputCloud(msg);
  octree.addPointsFromInputCloud();
  std::vector<int> newPointIdxVector;
  octree.getPointIndicesFromNewVoxels(newPointIdxVector);
  ROS_INFO("Indices_changed = %lu", newPointIdxVector.size());
  std_msgs::Int64 msg_publish;
  msg_publish.data = newPointIdxVector.size();
  pub.publish(msg_publish);

}

int main(int argc, char** argv)
{
  ros::init(argc, argv, "change_viewer");
  ros::NodeHandle nh;
  ros::Subscriber sub = nh.subscribe<PointCloud>("kinect2/sd/points", 1, callback);
  pub = nh.advertise<std_msgs::Int64>("commotion",10);
  ros::spin();
}
{'fraction_non_alphanumeric': 0.1596116504854369, 'fraction_numerical': 0.009320388349514564, 'mean_word_length': 7.024922118380062, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 37, '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': '505330', 'n_tokens_mistral': 995, 'n_tokens_neox': 964, 'n_words': 155}