Skip to content

Instantly share code, notes, and snippets.

View epiception's full-sized avatar

Ganesh Iyer epiception

View GitHub Profile
@tdenewiler
tdenewiler / CMakeLists.txt
Last active July 17, 2024 02:33
ROS Synchronization Example
cmake_minimum_required(VERSION 2.8.3)
project(sync_example)
find_package(catkin REQUIRED COMPONENTS message_filters roscpp sensor_msgs)
catkin_package(
CATKIN_DEPENDS message_filters roscpp sensor_msgs
)
include_directories(${catkin_INCLUDE_DIRS})
@jacyzon
jacyzon / viewer_cvmat2pc.cpp
Created June 26, 2016 10:34
convert opencv mat to point cloud
#include <XnCppWrapper.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <pcl/visualization/cloud_viewer.h>
void matToPointXYZ(cv::Mat &color, cv::Mat &depth,
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud) {
const double u0 = 3.3930780975300314e+02;
const double v0 = 2.4273913761751615e+02;
#include <glob.h>
#include <vector>
#include <string>
inline std::vector<std::string> glob(const std::string& pat){
using namespace std;
glob_t glob_result;
glob(pat.c_str(),GLOB_TILDE,NULL,&glob_result);
vector<string> ret;
for(unsigned int i=0;i<glob_result.gl_pathc;++i){
ret.push_back(string(glob_result.gl_pathv[i]));