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 
39 namespace armarx
40 {
41  /**
42  * @class EfficientRANSACPrimitiveExtractorPropertyDefinitions
43  * @brief Property definitions of `EfficientRANSACPrimitiveExtractor`.
44  */
47  {
48  public:
50  };
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,
67  virtual public DebugObserverComponentPluginUser,
69  {
70  public:
71  /// @see armarx::ManagedIceObject::getDefaultName()
72  std::string getDefaultName() const override;
73 
74 
75  protected:
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
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
ArVizComponentPlugin.h
armarx::EfficientRANSACPrimitiveExtractor::process
void process() override
Process the vision component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:195
RobotStateComponentPlugin.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
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:151
visionx::PointCloudProviderInfo
Definition: PointCloudProcessor.h:82
armarx::EfficientRANSACPrimitiveExtractor::getDefaultName
std::string getDefaultName() const override
Definition: EfficientRANSACPrimitiveExtractor.cpp:138
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:185
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:35
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:177
armarx::EfficientRANSACPrimitiveExtractor::onInitPointCloudProcessor
void onInitPointCloudProcessor() override
Setup the vision component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:144
DebugObserverComponentPlugin.h
armarx::plugins::RobotStateComponentPlugin::RobotData
Definition: RobotStateComponentPlugin.h:134
visionx::PointCloudProcessorPropertyDefinitions
Properties of PointCloudProcessor.
Definition: PointCloudProcessor.h:166
PointCloudProcessor.h
armarx::RemoteGuiComponentPluginUser
Definition: RemoteGuiComponentPlugin.h:221
armarx::EfficientRANSACPrimitiveExtractor::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: EfficientRANSACPrimitiveExtractor.cpp:233
Component.h
armarx::WidgetDescription::WidgetPtr
::IceInternal::Handle<::armarx::WidgetDescription::Widget > WidgetPtr
Definition: NJointControllerBase.h:67
armarx::EfficientRANSACPrimitiveExtractorPropertyDefinitions::EfficientRANSACPrimitiveExtractorPropertyDefinitions
EfficientRANSACPrimitiveExtractorPropertyDefinitions(std::string prefix)
Definition: EfficientRANSACPrimitiveExtractor.cpp:128
TripleBuffer.h
armarx::EfficientRANSACPrimitiveExtractor::buildGui
RemoteGui::WidgetPtr buildGui()
Definition: EfficientRANSACPrimitiveExtractor.cpp:42
armarx::EfficientRANSACPrimitiveExtractor::processGui
void processGui(RemoteGui::TabProxy &prx)
Definition: EfficientRANSACPrimitiveExtractor.cpp:102
armarx::EfficientRANSACPrimitiveExtractor::onExitPointCloudProcessor
void onExitPointCloudProcessor() override
Exit the ImapeProcessor component.
Definition: EfficientRANSACPrimitiveExtractor.cpp:190
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::DebugObserverComponentPluginUser
Definition: DebugObserverComponentPlugin.h:73
armarx::EfficientRANSACPrimitiveExtractor
Brief description of class EfficientRANSACPrimitiveExtractor.
Definition: EfficientRANSACPrimitiveExtractor.h:63
RemoteGuiComponentPlugin.h
armarx::RobotStateComponentPluginUser
Definition: RobotStateComponentPlugin.h:165
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::TripleBuffer< Config >