36 #include <mtt/TargetList.h>
37 #include <sensor_msgs/Range.h>
38 #include <pressure_cells/SenVal.h>
39 #include <odometer/OdometerStatus.h>
43 #include <boost/thread.hpp>
44 #include <boost/shared_ptr.hpp>
75 ofstream file(
"/media/Data/Data_Record/newtests/force_data.txt",ios::app);
76 file <<
"Time:" << msg.header.stamp <<
":LC1:" << msg.sen1 <<
":FSR1:" << msg.sen3 <<
":LC2:" << msg.sen2 <<
":FSR2:" << msg.sen4 << endl;
83 ofstream file(
"/media/Data/Data_Record/newtests/ir1_data.txt",ios::app);
84 file <<
"Time:" << msg.header.stamp <<
":IR1:" << msg.range << endl;
91 ofstream file(
"/media/Data/Data_Record/newtests/ir2_data.txt",ios::app);
92 file <<
"Time:" << msg.header.stamp <<
":IR2:" << msg.range << endl;
100 ofstream file(
"/media/Data/Data_Record/newtests/odometer_data.txt",ios::app);
101 file <<
"Time:" << msg.header.stamp <<
":VEL:" << msg.velocity << endl;
105 int main(
int argc,
char **argv)
108 ros::init(argc, argv,
"data_gather");
113 ros::Subscriber forceval_data = n.subscribe(
"/pedal_monitor/ForceVal", 1000,
forcevalGather);
114 ros::Subscriber ir1_data = n.subscribe(
"/pedal_monitor/IR_1", 1000,
ir1Gather);
115 ros::Subscriber ir2_data = n.subscribe(
"/pedal_monitor/IR_2", 1000,
ir2Gather);
116 ros::Subscriber odometer_data = n.subscribe(
"/pedal_monitor/odometer", 1000,
odometerGather);
void ir1Gather(const sensor_msgs::Range &msg)
int main(int argc, char **argv)
void forcevalGather(const pressure_cells::SenVal &msg)
void odometerGather(const odometer::OdometerStatus &msg)
void ir2Gather(const sensor_msgs::Range &msg)