Go to the documentation of this file.
34 #include <VisionX/interface/components/ImageToPointCloud.h>
37 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
39 #include <ArmarXCore/interface/observers/ObserverInterface.h>
41 #include <pcl/point_types.h>
49 typedef pcl::PointXYZRGBL
PointL;
63 defineOptionalProperty<std::string>(
"DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
65 defineOptionalProperty<int>(
"PointCloudWidth", 640,
"Must match the image width (cannot be read automaically from imageprovider as early as needed)");
66 defineOptionalProperty<int>(
"PointCloudHeight", 480,
"Must match the image height (cannot be read automaically from imageprovider as early as needed)");
68 defineOptionalProperty<float>(
"VerticalViewAngle", 43.0f,
"The vertical viewing angle of the camera. Only used when no calibration can be retrieved.");
69 defineOptionalProperty<float>(
"HorizontalViewAngle", 57.0f,
"The horizontal viewing angle of the camera. Only used when no calibration can be retrieved.");
70 defineOptionalProperty<bool>(
"ComputeViewAngleFromCalibration",
true,
"Use the field of view provided by the calibration provider");
73 defineOptionalProperty<float>(
"NaNValue", -1.0,
"NaN value to use if reported disparity is not available.");
74 defineOptionalProperty<float>(
"MaxDist", -1.0,
"The maximum distance for measurements. Ignored if smaller than zero");
75 defineOptionalProperty<float>(
"MinDist", 0.0,
"The minimum distance for measurements. ");
79 defineRequiredProperty<std::string>(
"ProviderName",
"ImageProvider name. image[0]: rgb image, image[1]: depth image, image[2](optional): label integer");
80 defineOptionalProperty<std::string>(
"CalibrationProviderName",
"",
"CalibrationProvider name. Optional. Useful if the images are processed and forwarded.");
98 virtual public armarx::ImageToPointCloudInterface
106 return "ImageToPointCloud";
121 return calibrationPrx->getStereoCalibration();
126 return calibrationPrx->getImagesAreUndistorted();
131 return calibrationPrx->getReferenceFrame();
172 visionx::StereoCalibrationInterfacePrx calibrationPrx;
174 armarx::MetaInfoSizeBasePtr imageMetaInfo;
183 int processCounter = 0;
185 std::string providerName;
190 pcl::PointCloud<PointL>::Ptr cloud, transformedCloud;
visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
void onConnectComponent() override
void onInitComponent() override
void onInitComponent() override
void onExitPointCloudProvider()
This is called when the Component::onExitComponent() setup is called.
The ImageProcessor class provides an interface for access to ImageProviders via Ice and shared memory...
void onExitComponent() override
std::string getDefaultName() const override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
void onInitPointCloudProvider()
This is called when the Component::onInitComponent() is called.
ImageProcessorPropertyDefinitions(std::string prefix)
virtual armarx::PropertyDefinitionsPtr createPropertyDefinitions()
bool getImagesAreUndistorted(const Ice::Current &c=Ice::emptyCurrent) override
void onExitComponent() override
Brief description of class ImageToPointCloud.
void onDisconnectComponent() override
Hook for subclass.
void onConnectComponent() override
void process() override
Process the vision component.
void onExitComponent() override
std::string getReferenceFrame(const Ice::Current &c=Ice::emptyCurrent) override
void onInitComponent() override
void onConnectComponent() override
void onConnectImageProcessor() override
Implement this method in the ImageProcessor in order execute parts when the component is fully initia...
void onInitImageProcessor() override
Setup the vision component.
ImageToPointCloudPropertyDefinitions(std::string prefix)
PointCloudProvider abstract class defines a component which provide point clouds via ice or shared me...
This file offers overloads of toIce() and fromIce() functions for STL container types.
virtual visionx::MetaPointCloudFormatPtr getDefaultPointCloudFormat()
default point cloud format used to initialize shared memory
void onExitImageProcessor() override
Exit the ImapeProcessor component.