40 #include "std_msgs/String.h"
42 #include "tf/transform_listener.h"
43 #include "mtt/TargetList.h"
79 static ros::Time start_time = ros::Time::now();
87 p_listener->lookupTwist(
"/map",
"/base_link", ros::Time(0), ros::Duration(0.5),
twist);
89 catch (tf::TransformException ex){
90 ROS_ERROR(
"%s",ex.what());
100 printf(
"%d,%d,%.10f,%.10f,%.10f,%.10f,%.10f,0,0,0,0\n",
106 for(uint i = 0; i < list.Targets.size(); i++){
108 target_x = list.Targets[i].pose.position.x;
109 target_y = list.Targets[i].pose.position.y;
110 target_theta = tf::getYaw(list.Targets[i].pose.orientation);
111 target_vel = sqrt(pow(list.Targets[i].velocity.linear.x,2)+
112 pow(list.Targets[i].velocity.linear.y,2));
136 printf(
"%d,%d,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f,%.10f\n",
228 int main(
int argc,
char **argv)
230 ros::init(argc, argv,
"process_target");
233 tf::TransformListener listener;
241 ros::Subscriber sub_tag = n.subscribe(
"/timetag", 1000,
tagCallback);