32#include <pcl/common/transforms.h>
33#include <pcl/filters/filter.h>
34#include <pcl/io/pcd_io.h>
35#include <pcl/point_types.h>
37#include <VirtualRobot/Robot.h>
44#include <RobotAPI/interface/core/RobotState.h>
48#include <VisionX/interface/components/FakePointCloudProviderInterface.h>
71 virtual public FakePointCloudProviderInterface,
121 const ::Ice::Current& = Ice::emptyCurrent)
override;
127 bool loadPointCloud(
const std::string& fileName);
128 bool loadPointCloudDirectory(
const std::string& directoryName);
129 bool loadCalibrationFile(std::string fileName, visionx::CameraParameters& calibration);
131 template <
typename Po
intT>
132 bool processAndProvide(
const pcl::PCLPointCloud2Ptr& pointCloud);
133 bool processRGBImage(
const pcl::PCLPointCloud2Ptr& pointCloud);
136 armarx::RemoteGui::WidgetPtr buildGui();
140 std::string pointCloudFileName;
142 std::string sourceFrameName;
144 std::string targetFrameName;
145 std::string providedPointCloudFormat;
146 std::string robotStateComponentName;
148 std::mutex pointCloudMutex;
149 std::vector<pcl::PCLPointCloud2Ptr> pointClouds;
151 std::atomic_int counter = 0;
153 std::atomic_bool rewind =
false;
154 std::atomic_bool removeNAN =
false;
155 std::atomic<float> scaleFactor = 0;
156 std::atomic_bool freezeImage =
false;
157 std::atomic_int freezeImageIdx = 0;
159 StereoCalibration calibration;
160 CByteImage** rgbImages =
nullptr;
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
CapturingPointCloudProviderPropertyDefinitions(std::string prefix)
The CapturingPointCloudProvider provides a callback function to trigger the capturing of point clouds...
float frameRate
Required frame rate.
FakePointCloudProviderPropertyDefinitions(std::string prefix)
void onInitComponent() override
Pure virtual hook for the subclass.
bool doCapture() override
void onExitCapturingPointCloudProvider() override
bool hasSharedMemorySupport(const Ice::Current &=Ice::emptyCurrent) override
void onDisconnectComponent() override
Hook for subclass.
bool getImagesAreUndistorted(const Ice::Current &=Ice::emptyCurrent) override
void onStartCapture(float frameRate) override
std::string getReferenceFrame(const Ice::Current &=Ice::emptyCurrent) override
void onInitCapturingPointCloudProvider() override
MetaPointCloudFormatPtr getDefaultPointCloudFormat() override
default point cloud format used to initialize shared memory
void onConnectComponent() override
Pure virtual hook for the subclass.
void onStopCapture() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onInitImageProvider() override
void setPointCloudFilename(const std::string &filename, const ::Ice::Current &=Ice::emptyCurrent) override
void onExitComponent() override
Hook for subclass.
void onExitImageProvider() override
StereoCalibration getStereoCalibration(const Ice::Current &=Ice::emptyCurrent) override
std::string getDefaultName() const override
ImageProvider abstract class defines a component which provide images via ice or shared memory.
std::shared_ptr< class Robot > RobotPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx