Go to the documentation of this file.00001 #include <ros/ros.h>
00002 #include <nav_msgs/Odometry.h>
00003 #include <stdio.h>
00004
00005 void gpsCallback(const nav_msgs::Odometry::ConstPtr& msg)
00006 {
00007
00008 printf("%lf,%lf,0\n",msg->pose.pose.position.y,msg->pose.pose.position.x,msg->pose.pose.position.z);
00009
00010 }
00011
00012 int main(int argc, char ** argv)
00013 {
00014 ros::init(argc, argv, "gps_dumper");
00015 ros::NodeHandle n;
00016 ros::Subscriber sub = n.subscribe("gps_odom", 1, gpsCallback);
00017 ros::spin();
00018 return 0;
00019 }