29#include <pcl/common/transforms.h>
30#include <pcl/filters/crop_box.h>
31#include <pcl/filters/filter.h>
32#include <pcl/io/pcd_io.h>
33#include <pcl/point_types.h>
35#include <opencv2/opencv.hpp>
41#include <VisionX/interface/components/PointCloudAndImageAndCalibrationProviderInterface.h>
43#include <Image/IplImageAdaptor.h>
44#include <MultiSense/MultiSenseChannel.hh>
45#include <MultiSense/MultiSenseTypes.hh>
50 static Eigen::Vector4f
51 stringToVector4f(std::string propertyValue)
54 sscanf(propertyValue.c_str(),
77 "minPoint", Eigen::Vector4f(-5000, -1e+06, -0, 1),
"")
80 "maxPoint", Eigen::Vector4f(1000, 1e+08, 1e+08, 1),
"")
84 "enableLight",
false,
"Switch on the MultiSense LEDs on startup");
87 "VisionX/examples/camera_multisense.txt",
88 "Camera calibration file");
104 virtual public visionx::CapturingPointCloudAndImageAndStereoCalibrationProviderInterface,
115 return "MultiSensePointCloudProvider";
201 visionx::MonocularCalibration
204 visionx::StereoCalibration
221 pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointCloudData;
223 crl::multisense::Channel* driver;
225 boost::mutex dataMutex;
227 crl::multisense::DataSource mask;
229 bool hasNewDisparityData;
230 bool hasNewColorData;
232 std::vector<uint8_t> lumaData;
235 cv::Mat_<double> q_matrix;
238 cv::Mat disparityImage;
240 Eigen::Matrix4f cameraToSpindle;
241 Eigen::Matrix4f laserToSpindle;
243 pcl::CropBox<pcl::PointXYZRGBA> cropBoxFilter;
246 visionx::StereoCalibration calibration;
247 CByteImage** rgbImages;
virtual void onExitComponent()
Hook for subclass.
virtual void onDisconnectComponent()
Hook for subclass.
virtual void onConnectComponent()=0
Pure virtual hook for the subclass.
virtual void onInitComponent()=0
Pure virtual hook for the subclass.
MultiSensePointCloudProviderPropertyDefinitions(std::string prefix)
Brief description of class MultiSensePointCloudProvider.
bool hasSharedMemorySupport(const Ice::Current &c=Ice::emptyCurrent) override
void disparityImageCallback(const crl::multisense::image::Header &header)
void onInitComponent() override
Pure virtual hook for the subclass.
bool doCapture() override
void onExitCapturingPointCloudProvider() override
void onDisconnectComponent() override
Hook for subclass.
visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
visionx::MetaPointCloudFormatPtr getDefaultPointCloudFormat() override
default point cloud format used to initialize shared memory
void lumaImageCallback(const crl::multisense::image::Header &header)
void onStartCapture(float frameRate) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void lidarScanCallback(const crl::multisense::lidar::Header &header)
void onInitCapturingPointCloudProvider() override
void onConnectComponent() override
Pure virtual hook for the subclass.
void onStopCapture() override
void onInitImageProvider() override
void chromaImageCallback(const crl::multisense::image::Header &header)
void onExitComponent() override
Hook for subclass.
void onExitImageProvider() override
std::string getDefaultName() const override
bool getImagesAreUndistorted(const ::Ice::Current &c=Ice::emptyCurrent) override
visionx::MonocularCalibration getMonocularCalibration(const ::Ice::Current &c=Ice::emptyCurrent) override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
std::function< PropertyType(std::string)> PropertyFactoryFunction
CapturingPointCloudProviderPropertyDefinitions(std::string prefix)
The CapturingPointCloudProvider provides a callback function to trigger the capturing of point clouds...
float frameRate
Required frame rate.
ImageProvider abstract class defines a component which provide images via ice or shared memory.
void onInitComponent() override
void onDisconnectComponent() override
Hook for subclass.
void onConnectComponent() override
void onExitComponent() override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.