FilterKnownObjects.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::FilterKnownObjects
17 * @author Markus Grotz ( markus dot grotz at kit dot edu )
18 * @date 2022
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25
26#include <pcl/filters/crop_box.h>
27#include <pcl/point_types.h>
28
30#include <ArmarXCore/interface/observers/ObserverInterface.h>
31
33
36
38
39namespace armarx
40{
41 /**
42 * @defgroup Component-FilterKnownObjects FilterKnownObjects
43 * @ingroup VisionX-Components
44 * A description of the component FilterKnownObjects.
45 *
46 * @class FilterKnownObjects
47 * @ingroup Component-FilterKnownObjects
48 * @brief Brief description of class FilterKnownObjects.
49 *
50 * Detailed description of class FilterKnownObjects.
51 */
53 virtual public visionx::PointCloudProcessor,
57 {
58 /// The used point type.
59 using PointT = pcl::PointXYZRGBL;
60
61 public:
62 /// @see armarx::ManagedIceObject::getDefaultName()
63 std::string getDefaultName() const override;
64
65 static std::string
67 {
68 return "FilterKnownObjects";
69 }
70
71
72 protected:
73 /// @see PropertyUser::createPropertyDefinitions()
75
76 /// @see visionx::PointCloudProcessor::onInitPointCloudProcessor()
77 void onInitPointCloudProcessor() override;
78
79 /// @see visionx::PointCloudProcessor::onConnectPointCloudProcessor()
80 void onConnectPointCloudProcessor() override;
81
82 /// @see visionx::PointCloudProcessor::onDisconnectPointCloudProcessor()
83 void onDisconnectPointCloudProcessor() override;
84
85 /// @see visionx::PointCloudProcessor::onExitPointCloudProcessor()
86 void onExitPointCloudProcessor() override;
87
88 /// @see visionx::PointCloudProcessor::process()
89 void process() override;
90
91
92 /// This function should be called once in onConnect() or when you
93 /// need to re-create the Remote GUI tab.
94 void createRemoteGuiTab();
95
96 /// After calling `RemoteGui_startRunningTask`, this function is
97 /// called periodically in a separate thread. If you update variables,
98 /// make sure to synchronize access to them.
99 void RemoteGui_update() override;
100
101
102 private:
103 pcl::CropBox<PointT> filter;
104
105 struct Properties
106 {
107 std::string objectInstanceMemoryName = "Object";
108
109
110 float resizeOBBFactor = 10.0;
111
112 bool visualization = false;
113 };
114
115 Properties properties;
116 std::mutex propertiesMutex;
117
118 // Tab shown in the Remote GUI.
119 struct RemoteGuiTab : armarx::RemoteGui::Client::Tab
120 {
121 //armarx::RemoteGui::Client::LineEdit boxLayerName;
122 //armarx::RemoteGui::Client::IntSpinBox numBoxes;
123
125 };
126
127 RemoteGuiTab tab;
128
129
130 std::mutex arvizMutex;
131 };
132} // namespace armarx
Provides a ready-to-use ArViz client arviz as member variable.
Brief description of class FilterKnownObjects.
void RemoteGui_update() override
After calling RemoteGui_startRunningTask, this function is called periodically in a separate thread.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onExitPointCloudProcessor() override
void onConnectPointCloudProcessor() override
void onDisconnectPointCloudProcessor() override
static std::string GetDefaultName()
void onInitPointCloudProcessor() override
void createRemoteGuiTab()
This function should be called once in onConnect() or when you need to re-create the Remote GUI tab.
std::string getDefaultName() const override
Provides an objpose::ObjectPoseTopicPrx objectPoseTopic as member variable.
The PointCloudProcessor class provides an interface for access to PointCloudProviders via Ice and sha...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.