Go to the documentation of this file.
27 #include <VisionX/interface/components/VoxelGridProviderInterface.h>
29 #include <RobotAPI/interface/core/RobotState.h>
33 #include <VirtualRobot/VirtualRobot.h>
34 #include <VirtualRobot/Visualization/VisualizationFactory.h>
36 #include <pcl/octree/octree.h>
42 class IceReportSkipper;
58 defineOptionalProperty<std::string>(
"PointCloudLoadFilepath",
"",
"If set, the accumulated point cloud is loaded from the file");
59 defineOptionalProperty<std::string>(
"PointCloudStoreFilepath",
"",
"If set, the accumulated point cloud is stored to this file periodically");
60 defineOptionalProperty<float>(
"PointCloudStorageFrequency", 0.1f,
"Frequency at which the collected point cloud is stored.");
61 defineOptionalProperty<std::string>(
"RobotStateComponentName",
"RobotStateComponent",
"Name of the robot state component that should be used");
62 defineOptionalProperty<std::string>(
"providerName",
"OpenNIPointCloudProvider",
"name of the point cloud provider");
63 defineOptionalProperty<std::string>(
"sourceFrameName",
"",
"The source frame name. If unspecified the value will be retrieved from the provider.");
67 defineOptionalProperty<float>(
"UpdateRate", 2.0f,
"Frequency how often the voxel grid is updated");
68 defineOptionalProperty<bool>(
"ActivateOnStartUp",
true,
"If true, the component will start collection point cloud directly after start up. Otherwise use interface functions.");
88 virtual public VoxelGridProviderInterface
92 using Cloud = pcl::PointCloud<PointType>;
119 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);
135 pcl::octree::OctreePointCloud<PointType>::Ptr
octtree;
143 std::unique_ptr<armarx::IceReportSkipper>
skipper;
156 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.
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)
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...
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.