32 #include <VisionX/interface/components/PointCloudAndImageAndCalibrationProviderInterface.h>
34 #include <pcl/point_types.h>
35 #include <pcl/io/pcd_io.h>
36 #include <pcl/common/transforms.h>
37 #include <pcl/filters/filter.h>
38 #include <pcl/filters/crop_box.h>
40 #include <opencv2/opencv.hpp>
42 #include <MultiSense/MultiSenseChannel.hh>
43 #include <MultiSense/MultiSenseTypes.hh>
46 #include <Image/IplImageAdaptor.h>
53 static Eigen::Vector4f stringToVector4f(std::string propertyValue)
56 sscanf(propertyValue.c_str(),
"%f, %f, %f, %f", &vec.data()[0], &vec.data()[1], &vec.data()[2], &vec.data()[3]);
74 defineOptionalProperty<Eigen::Vector4f>(
"minPoint", Eigen::Vector4f(-5000, -1e+06, -0, 1),
"").setFactory(f);
75 defineOptionalProperty<Eigen::Vector4f>(
"maxPoint", Eigen::Vector4f(1000, 1e+08, 1e+08, 1),
"").setFactory(f);
76 defineOptionalProperty<std::string>(
"ipAddress",
"10.66.171.21",
"Description");
77 defineOptionalProperty<bool>(
"enableLight",
false,
"Switch on the MultiSense LEDs on startup");
78 defineOptionalProperty<bool>(
"useLidar",
false,
"Use the laser for depth information");
79 defineOptionalProperty<std::string>(
"CalibrationFileName",
"VisionX/examples/camera_multisense.txt",
"Camera calibration file");
95 virtual public visionx::CapturingPointCloudAndImageAndStereoCalibrationProviderInterface,
105 return "MultiSensePointCloudProvider";
205 pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointCloudData;
207 crl::multisense::Channel* driver;
209 boost::mutex dataMutex;
211 crl::multisense::DataSource mask;
213 bool hasNewDisparityData;
214 bool hasNewColorData;
216 std::vector<uint8_t> lumaData;
219 cv::Mat_<double> q_matrix;
222 cv::Mat disparityImage;
227 pcl::CropBox<pcl::PointXYZRGBA> cropBoxFilter;
230 visionx::StereoCalibration calibration;
231 CByteImage** rgbImages;