EfficientRANSACPrimitiveExtractor.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package VisionX::ArmarXObjects::EfficientRANSACPrimitiveExtractor
17 * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18 * @date 2020
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25
27#include <ArmarXCore/interface/observers/ObserverInterface.h>
30
32
35
37#include <VisionX/interface/core/PointCloudProcessorInterface.h>
38
39namespace armarx
40{
41 /**
42 * @class EfficientRANSACPrimitiveExtractorPropertyDefinitions
43 * @brief Property definitions of `EfficientRANSACPrimitiveExtractor`.
44 */
51
52 /**
53 * @defgroup Component-EfficientRANSACPrimitiveExtractor EfficientRANSACPrimitiveExtractor
54 * @ingroup VisionX-Components
55 * A description of the component EfficientRANSACPrimitiveExtractor.
56 *
57 * @class EfficientRANSACPrimitiveExtractor
58 * @ingroup Component-EfficientRANSACPrimitiveExtractor
59 * @brief Brief description of class EfficientRANSACPrimitiveExtractor.
60 *
61 * Detailed description of class EfficientRANSACPrimitiveExtractor.
62 */
64 virtual public visionx::PointCloudProcessor,
65 virtual public RemoteGuiComponentPluginUser,
66 virtual public RobotStateComponentPluginUser,
69 {
70 public:
71 /// @see armarx::ManagedIceObject::getDefaultName()
72 std::string getDefaultName() const override;
73
74
75 protected:
76 RemoteGui::WidgetPtr buildGui();
78 void process() override;
79 template <class PointType>
80 void process();
81
82 void onInitPointCloudProcessor() override;
83 void onConnectPointCloudProcessor() override;
84 void onDisconnectPointCloudProcessor() override;
85 void onExitPointCloudProcessor() override;
86
87 /// @see PropertyUser::createPropertyDefinitions()
89
90 private:
91 //provider data
92 std::string _pointCloudProviderName;
93 visionx::PointCloudProviderInfo _pointCloudProviderInfo;
94 visionx::PointCloudProviderInterfacePrx _pointCloudProvider;
95 std::string _pointCloudProviderRefFrame;
96
97 //other
98 RobotStateComponentPlugin::RobotData _localRobot;
99
100 struct Config
101 {
102 Config()
103 {
104 }
105
106 int outlierMeanK = 50;
107 float outlierStddevMulThresh = 1.0;
108
109 float ransacEpsilon = 25;
110 float ransacNormalThresh = 0.9f;
111 int ransacMinSupport = 100;
112 float ransacBitmapEpsilon = 50;
113 float ransacProbability = 0.001f;
114 int ransacMaxruntimeMs = 15000;
115 };
116
117 TripleBuffer<Config> _cfgBuf;
118 };
119} // namespace armarx
Brief description of class EfficientRANSACPrimitiveExtractor.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void process() override
Process the vision component.
void onExitPointCloudProcessor() override
Exit the ImapeProcessor component.
void onConnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component is fully i...
void onDisconnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component looses net...
void onInitPointCloudProcessor() override
Setup the vision component.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
A simple triple buffer for lockfree comunication between a single writer and a single reader.
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
armarx::ArVizComponentPluginUser ArVizComponentPluginUser
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.