UCLObjectRecognition.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::UCLObjectRecognition
17 * @author Mirko Waechter (waechter at kit dot edu)
18 * @date 2017
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <VirtualRobot/Robot.h>
26
27#include <RobotAPI/interface/core/RobotState.h>
28#include <RobotAPI/interface/speech/SpeechInterface.h>
29#include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
31
33#include <VisionX/interface/components/FaceRecognitionInterface.h>
34#include <VisionX/interface/components/ObjectPoseInterface.h>
35#include <VisionX/interface/components/PointCloudAndImageAndCalibrationProviderInterface.h>
37
38#include <MemoryX/interface/components/LongtermMemoryInterface.h>
39
40//#include <Python.h>
41
42
43namespace visionx
44{
45 /**
46 * @class UCLObjectRecognitionPropertyDefinitions
47 * @brief
48 */
50 {
51 public:
54 {
56 "AgentName", "Armar6", "Name of the robot that does the localization");
58 "CameraFrameName",
59 "DepthCamera",
60 "Name of the camera frame of the robot that does the localization");
62 "spraybottle:5;brush:1",
63 "map between object names and mask rcnn names");
64
66 "RobotStateComponentName",
67 "RobotStateComponent",
68 "Name of the robot state component that should be used");
70 "DebugDrawerTopicName", "DebugDrawerUpdates", "Name of the debug drawer topic");
71 }
72 };
73
74 /**
75 * @defgroup Component-UCLObjectRecognition UCLObjectRecognition
76 * @ingroup VisionX-Components
77 * A description of the component UCLObjectRecognition.
78 *
79 * @class UCLObjectRecognition
80 * @ingroup Component-UCLObjectRecognition
81 * @brief Brief description of class UCLObjectRecognition.
82 *
83 * Detailed description of class UCLObjectRecognition.
84 */
86 public armarx::Component,
87 virtual public memoryx::ObjectLocalizerInterface
88 {
89 public:
90 /**
91 * @see armarx::ManagedIceObject::getDefaultName()
92 */
93 std::string
94 getDefaultName() const override
95 {
96 return "UCLObjectRecognition";
97 }
98
99 protected:
100 memoryx::ObjectLocalizationResultList
101 localizeAndIdentifyFaces(CByteImage** cameraImages,
102 armarx::MetaInfoSizeBasePtr imageMetaInfo,
103 CByteImage** resultImages);
104 /**
105 * @see PropertyUser::createPropertyDefinitions()
106 */
108 typedef std::map<std::string, std::list<std::pair<IceUtil::Time, double>>>
110
111 private:
112 ObjectPoseInterfacePrx prx;
113 armarx::DebugDrawerInterfacePrx debugDrawerTopicPrx;
114 armarx::RobotStateComponentInterfacePrx robotStateComponent;
115 VirtualRobot::RobotPtr localRobot;
116
117 public:
118 memoryx::ObjectLocalizationResultList
119 localizeObjectClasses(const memoryx::ObjectClassNameList& classes,
120 const Ice::Current&) override;
121
122 // ManagedIceObject interface
123 protected:
124 void onInitComponent() override;
125 void onConnectComponent() override;
126 };
127} // namespace visionx
Default component property definition container.
Definition Component.h:70
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
Brief description of class UCLObjectRecognition.
void onInitComponent() override
Pure virtual hook for the subclass.
std::map< std::string, std::list< std::pair< IceUtil::Time, double > > > FaceConfidenceHistory
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
memoryx::ObjectLocalizationResultList localizeObjectClasses(const memoryx::ObjectClassNameList &classes, const Ice::Current &) override
void onConnectComponent() override
Pure virtual hook for the subclass.
memoryx::ObjectLocalizationResultList localizeAndIdentifyFaces(CByteImage **cameraImages, armarx::MetaInfoSizeBasePtr imageMetaInfo, CByteImage **resultImages)
std::string getDefaultName() const override
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
ArmarX headers.