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
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}) |
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 <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; |
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 <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])); |