Go to the documentation of this file.
28 #include <pcl/octree/octree.h>
30 #include <VirtualRobot/VirtualRobot.h>
31 #include <VirtualRobot/Visualization/VisualizationFactory.h>
36 #include <RobotAPI/interface/core/RobotState.h>
40 #include <VisionX/interface/components/VoxelGridProviderInterface.h>
44 class IceReportSkipper;
59 defineOptionalProperty<std::string>(
60 "PointCloudLoadFilepath",
62 "If set, the accumulated point cloud is loaded from the file");
63 defineOptionalProperty<std::string>(
64 "PointCloudStoreFilepath",
66 "If set, the accumulated point cloud is stored to this file periodically");
67 defineOptionalProperty<float>(
68 "PointCloudStorageFrequency",
70 "Frequency at which the collected point cloud is stored.");
71 defineOptionalProperty<std::string>(
72 "RobotStateComponentName",
73 "RobotStateComponent",
74 "Name of the robot state component that should be used");
75 defineOptionalProperty<std::string>(
76 "providerName",
"OpenNIPointCloudProvider",
"name of the point cloud provider");
77 defineOptionalProperty<std::string>(
"sourceFrameName",
79 "The source frame name. If unspecified the value "
80 "will be retrieved from the provider.");
81 defineOptionalProperty<std::string>(
83 "0,6000;0,6000;100,2500",
84 "Point cloud points outside of this bouning box will be cropped",
86 defineOptionalProperty<float>(
"GridSize",
88 "Size in x,y,z dimension of each entry of the voxel grid",
90 defineOptionalProperty<int>(
91 "MinimumPointNumberPerVoxel",
93 "Minimum number of points in a voxel of the grid to be considered a filled voxel.",
95 defineOptionalProperty<float>(
96 "UpdateRate", 2.0f,
"Frequency how often the voxel grid is updated");
97 defineOptionalProperty<bool>(
100 "If true, the component will start collection point cloud directly after start up. "
101 "Otherwise use interface functions.");
121 virtual public VoxelGridProviderInterface
125 using Cloud = pcl::PointCloud<PointType>;
151 std::pair<armarx::Vector3fSeq, std::vector<VirtualRobot::VisualizationFactory::Color>>
153 std::vector<VirtualRobot::VisualizationFactory::Color>
const& gridColors,
155 float distanceThreshold);
158 float distanceThreshold);
173 pcl::octree::OctreePointCloud<PointType>::Ptr
octtree;
181 std::unique_ptr<armarx::IceReportSkipper>
skipper;
193 void reset(
const Ice::Current&)
override;
std::string getDefaultName() const override
const VariantTypeId Float
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::unique_ptr< armarx::IceReportSkipper > skipper
VoxelGridMappingProvider()
void startCollectingPointClouds(const Ice::Current &) override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
bool collectingPointClouds
Eigen::Vector3f croppingMax
armarx::DebugDrawerInterfacePrx dd
std::shared_ptr< class RobotPool > RobotPoolPtr
void onInitPointCloudProcessor() override
Setup the vision component.
pcl::PointCloud< PointType > Cloud
VoxelGridMappingProviderPropertyDefinitions(std::string prefix)
armarx::RobotStateComponentInterfacePrx robotStateComponent
armarx::Vector3fSeq gridPositions
std::string sourceFrameName
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
std::pair< armarx::Vector3fSeq, std::vector< VirtualRobot::VisualizationFactory::Color > > removeRobotVoxels(const armarx::Vector3fSeq &gridPoints, std::vector< VirtualRobot::VisualizationFactory::Color > const &gridColors, const VirtualRobot::RobotPtr &robot, float distanceThreshold)
void stopCollectingPointClouds(const Ice::Current &) override
void onConnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component is fully i...
::Ice::Float getGridSize(const ::Ice::Current &=Ice::emptyCurrent) const override
VirtualRobot::TriMeshModelPtr gridMesh
Default component property definition container.
pcl::PointXYZRGBA PointType
armarx::RobotPoolPtr robotPool
void process() override
Process the vision component.
CloudPtr accumulatedPointCloud
std::unique_ptr< armarx::CycleUtil > cycleKeeper
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Brief description of class VoxelGridMappingProvider.
void reset(const Ice::Current &) override
void componentPropertiesUpdated(const std::set< std::string > &changedProperties) override
Implement this function if you would like to react to changes in the properties.
pcl::octree::OctreePointCloud< PointType >::Ptr octtree
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string pointCloudFormat
std::shared_ptr< class Robot > RobotPtr
Eigen::Vector3f croppingMin
armarx::Vector3fSeq getFilledGridPositions(const Ice::Current &) const override
void onExitPointCloudProcessor() override
Exit the ImapeProcessor component.