<commit_before>#include "ros/ros.h"
#include <tf/tf.h>
#include "sensor_msgs/PointCloud2.h"
#include "geometry_msgs/Vector3.h"
#include "geometry_msgs/Twist.h"

ros::Publisher move_pub;

void goToCentroid(const geometry_msgs::Vector3::ConstPtr&);

int main(int argc, char** argv)
{
    // /cmd_vel_mux/input/teleop
    ros::init(argc, argv, "move_to_cap_node");
    
    ros::NodeHandle nh;
    
    ros::Subscriber centroid_sub = nh.subscribe("detect_cap/centroid", 100, goToCentroid);
    tf::TransformListener listener;
    move_pub = nh.advertise<geometry_msgs::Twist>("cmd_vel", 100);
    
    ros::Rate rate(10.0);
    while (nh.ok()){
	ros::spinOnce();
	rate.sleep();
   }
}

void goToCentroid(const geometry_msgs::Vector3::ConstPtr& centroid) {
    //Try to obtain
    tf::StampedTransform transform;
    try{
	listener.lookupTransform("/base_link", "/camera_depth_optical_frame", ros::Time(0), transform);
    }
    catch (tf::TransformException ex){
	ROS_ERROR("%s",ex.what());
	ros::Duration(1.0).sleep();
	return;
    }
    
    tf::Vector3 centroid_vec(centroid->x, centroid->y, centroid->z);
    tf::Vector3 centroid_transformed = vectorTransform(centroid_vec);
    
    ROS_INFO("TRANSFORMED CENTROID: " + centroid_transformed.x, centroid_transformed.y, centroid_transformed.z);
}
<commit_msg>Bug fixes Corrected compiler errors<commit_after>#include "ros/ros.h"
#include <tf/tf.h>
#include <tf/transform_listener.h>
#include "sensor_msgs/PointCloud2.h"
#include "geometry_msgs/Vector3.h"
#include "geometry_msgs/Twist.h"

ros::Publisher move_pub;

void goToCentroid(const geometry_msgs::Vector3::ConstPtr&);

int main(int argc, char** argv)
{
    // /cmd_vel_mux/input/teleop
    ros::init(argc, argv, "move_to_cap_node");
    
    ros::NodeHandle nh;
    
    ros::Subscriber centroid_sub = nh.subscribe("detect_cap/centroid", 100, goToCentroid);
    move_pub = nh.advertise<geometry_msgs::Twist>("cmd_vel", 100);
    
    ros::Rate rate(10.0);
    while (nh.ok()){
	ros::spinOnce();
	rate.sleep();
   }
}

void goToCentroid(const geometry_msgs::Vector3::ConstPtr& centroid) {
    //Try to obtain
    tf::TransformListener listener;
    tf::StampedTransform transform;
    try{
	listener.lookupTransform("/base_link", "/camera_depth_optical_frame", ros::Time(0), transform);
    }
    catch (tf::TransformException ex){
	ROS_ERROR("%s",ex.what());
	ros::Duration(1.0).sleep();
	return;
    }
    
    tf::Vector3 centroid_vec(centroid->x, centroid->y, centroid->z);
    tf::Vector3 centroid_transformed = transform(centroid_vec);
    
    ROS_INFO("TRANSFORMED CENTROID: " + centroid_transformed.x, centroid_transformed.y, centroid_transformed.z);
}

{'fraction_non_alphanumeric': 0.15335583052118484, 'fraction_numerical': 0.013498312710911136, 'mean_word_length': 4.73763440860215, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, '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': '7545165', 'n_tokens_mistral': 1000, 'n_tokens_neox': 956, 'n_words': 154}