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 static std::string GetDefaultName();
74
75
76 protected:
77 RemoteGui::WidgetPtr buildGui();
79 void process() override;
80 template <class PointType>
81 void process();
82
83 void onInitPointCloudProcessor() override;
84 void onConnectPointCloudProcessor() override;
85 void onDisconnectPointCloudProcessor() override;
86 void onExitPointCloudProcessor() override;
87
88 /// @see PropertyUser::createPropertyDefinitions()
90
91 private:
92 //provider data
93 std::string _pointCloudProviderName;
94 visionx::PointCloudProviderInfo _pointCloudProviderInfo;
95 visionx::PointCloudProviderInterfacePrx _pointCloudProvider;
96 std::string _pointCloudProviderRefFrame;
97
98 //other
99 RobotStateComponentPlugin::RobotData _localRobot;
100
101 struct Config
102 {
103 Config()
104 {
105 }
106
107 int outlierMeanK = 50;
108 float outlierStddevMulThresh = 1.0;
109
110 float ransacEpsilon = 25;
111 float ransacNormalThresh = 0.9f;
112 int ransacMinSupport = 100;
113 float ransacBitmapEpsilon = 50;
114 float ransacProbability = 0.001f;
115 int ransacMaxruntimeMs = 15000;
116 };
117
118 TripleBuffer<Config> _cfgBuf;
119 };
120} // 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.