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 
28 #include <ArmarXCore/interface/observers/ObserverInterface.h>
30 
32 
35 
37 #include <VisionX/interface/core/PointCloudProcessorInterface.h>
38 
39 namespace armarx
40 {
41  /**
42  * @class EfficientRANSACPrimitiveExtractorPropertyDefinitions
43  * @brief Property definitions of `EfficientRANSACPrimitiveExtractor`.
44  */
47  {
48  public:
50  };
51 
52 
53 
54  /**
55  * @defgroup Component-EfficientRANSACPrimitiveExtractor EfficientRANSACPrimitiveExtractor
56  * @ingroup VisionX-Components
57  * A description of the component EfficientRANSACPrimitiveExtractor.
58  *
59  * @class EfficientRANSACPrimitiveExtractor
60  * @ingroup Component-EfficientRANSACPrimitiveExtractor
61  * @brief Brief description of class EfficientRANSACPrimitiveExtractor.
62  *
63  * Detailed description of class EfficientRANSACPrimitiveExtractor.
64  */
66  virtual public visionx::PointCloudProcessor,
67  virtual public RemoteGuiComponentPluginUser,
68  virtual public RobotStateComponentPluginUser,
69  virtual public DebugObserverComponentPluginUser,
71  {
72  public:
73 
74  /// @see armarx::ManagedIceObject::getDefaultName()
75  std::string getDefaultName() const override;
76 
77 
78  protected:
81  void process() override;
82  template<class PointType> void process();
83 
84  void onInitPointCloudProcessor() override;
85  void onConnectPointCloudProcessor() override;
86  void onDisconnectPointCloudProcessor() override;
87  void onExitPointCloudProcessor() override;
88 
89  /// @see PropertyUser::createPropertyDefinitions()
91 
92  private:
93  //provider data
94  std::string _pointCloudProviderName;
95  visionx::PointCloudProviderInfo _pointCloudProviderInfo;
96  visionx::PointCloudProviderInterfacePrx _pointCloudProvider;
97  std::string _pointCloudProviderRefFrame;
98 
99  //other
101 
102  struct Config
103  {
104  Config() {}
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  TripleBuffer<Config> _cfgBuf;
117  };
118 }
ArVizComponentPlugin.h
armarx::EfficientRANSACPrimitiveExtractor::process
void process() override
Process the vision component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:165
RobotStateComponentPlugin.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::EfficientRANSACPrimitiveExtractor::onConnectPointCloudProcessor
void onConnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component is fully i...
Definition: EfficientRANSACPrimitiveExtractor.cpp:124
visionx::PointCloudProviderInfo
Definition: PointCloudProcessor.h:83
armarx::EfficientRANSACPrimitiveExtractor::getDefaultName
std::string getDefaultName() const override
Definition: EfficientRANSACPrimitiveExtractor.cpp:114
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::EfficientRANSACPrimitiveExtractor::onDisconnectPointCloudProcessor
void onDisconnectPointCloudProcessor() override
Implement this method in the PointCloudProcessor in order execute parts when the component looses net...
Definition: EfficientRANSACPrimitiveExtractor.cpp:157
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:36
armarx::EfficientRANSACPrimitiveExtractorPropertyDefinitions
Property definitions of EfficientRANSACPrimitiveExtractor.
Definition: EfficientRANSACPrimitiveExtractor.h:45
visionx::PointCloudProcessor
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
Definition: PointCloudProcessor.h:186
armarx::EfficientRANSACPrimitiveExtractor::onInitPointCloudProcessor
void onInitPointCloudProcessor() override
Setup the vision component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:119
DebugObserverComponentPlugin.h
armarx::plugins::RobotStateComponentPlugin::RobotData
Definition: RobotStateComponentPlugin.h:136
visionx::PointCloudProcessorPropertyDefinitions
Properties of PointCloudProcessor.
Definition: PointCloudProcessor.h:173
PointCloudProcessor.h
armarx::RemoteGuiComponentPluginUser
Definition: RemoteGuiComponentPlugin.h:240
armarx::EfficientRANSACPrimitiveExtractor::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: EfficientRANSACPrimitiveExtractor.cpp:187
Component.h
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:66
armarx::EfficientRANSACPrimitiveExtractorPropertyDefinitions::EfficientRANSACPrimitiveExtractorPropertyDefinitions
EfficientRANSACPrimitiveExtractorPropertyDefinitions(std::string prefix)
Definition: EfficientRANSACPrimitiveExtractor.cpp:107
TripleBuffer.h
armarx::EfficientRANSACPrimitiveExtractor::buildGui
RemoteGui::WidgetPtr buildGui()
Definition: EfficientRANSACPrimitiveExtractor.cpp:40
armarx::EfficientRANSACPrimitiveExtractor::processGui
void processGui(RemoteGui::TabProxy &prx)
Definition: EfficientRANSACPrimitiveExtractor.cpp:82
armarx::EfficientRANSACPrimitiveExtractor::onExitPointCloudProcessor
void onExitPointCloudProcessor() override
Exit the ImapeProcessor component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:161
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::DebugObserverComponentPluginUser
Definition: DebugObserverComponentPlugin.h:82
armarx::EfficientRANSACPrimitiveExtractor
Brief description of class EfficientRANSACPrimitiveExtractor.
Definition: EfficientRANSACPrimitiveExtractor.h:65
RemoteGuiComponentPlugin.h
armarx::RobotStateComponentPluginUser
Definition: RobotStateComponentPlugin.h:167
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::TripleBuffer< Config >