This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Removes all tfs except the one that has 'base_footprint' as child frame id | |
rosbag filter old.bag new.bag "topic != '/tf' or (len(m.transforms)>0 and m.transforms[0].child_frame_id=='base_footprint')" | |
#Same as above but limiting other topics to '/odom' and '/scan' | |
rosbag filter old.bag new.bag "topic == '/odom' or topic == '/scan' or (topic == '/tf' and len(m.transforms)>0 and m.transforms[0].child_frame_id=='imu_link')" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
void writeCSV(string filename, Mat m) | |
{ | |
ofstream myfile; | |
myfile.open(filename.c_str()); | |
myfile<< cv::format(m, cv::Formatter::FMT_CSV) << std::endl; | |
myfile.close(); | |
} |