53 nane_file.append(
"../");
55 nane_file.erase(nane_file.end()-4, nane_file.end());
56 nane_file.append(
".txt");
58 fp = fopen(nane_file.c_str(),
"a+");
63 cout<<
"cannot open file: recognition_data.txt" <<endl;
67 fprintf(
fp,
"%s \t %f \t %d \t %d \t %d \t %d \t %d \t %d \t %f \t %f \t %f\n",
144 if (rosout_msg.msg[0]==
'O' && rosout_msg.msg[1]==
'p'&& rosout_msg.msg[2]==
'e'&& rosout_msg.msg[6]==
'g')
146 char name_file[1024];
150 sscanf(rosout_msg.msg.c_str(),
"%*s %s",name_file);
167 fp = fopen(
"../recognition_data.txt",
"a+");
169 fprintf(
fp,
"%s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s \t %s\n",
190 int main (
int argc,
char **argv)
192 ROS_INFO(
"Starting recognition_data node.");
196 ros::init(argc,argv,
"recognition");
199 ROS_ERROR(
"AtlascarStatus and AtlascarVelocityStatus no longer avaliable, please correct!!");
void create_head_of_file(void)
Function that organizes the variables in the txt file.
to store the variables of driver monitoring arduino
Nodelet that recieves ros msg's from a bag file and then prints to a text file,.
int main(int argc, char **argv)
main of program
class_recognition::TYPE_msg_bags recognition
void topic_callback_rosout(rosgraph_msgs::Log rosout_msg)
Callback to save the msg from driver monitoring Arduino.
class_recognition::TYPE_msg_partial partial_msg
to store the name of the bag file played
int cria_txt(void)
Create a txt file with the information needed to use in matlab.