Skip to content

Instantly share code, notes, and snippets.

View aybakana's full-sized avatar

Abdulbaki aybakana

View GitHub Profile
@sven-bock
sven-bock / gist:408b6e845666e06a0cf4002271c2780f
Last active September 19, 2020 03:17
rosbag filter specific TF
#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')"
@zhou-chao
zhou-chao / writeCSV.cpp
Created September 15, 2015 14:45
Save OpenCV mat as CSV format
#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();
}