HandPredicateProvider.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 ArmarX::
17* @author Valerij Wittenbeck ( valerij.wittenbeck at student dot kit dot edu)
18* @date 2014
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
26#include <MemoryX/interface/components/WorkingMemoryInterface.h>
27#include <MemoryX/interface/memorytypes/MemorySegments.h>
29
30namespace memoryx
31{
32
34 {
35 public:
38 {
40 "DistanceThreshold",
41 150.f,
42 "Threshold below which an object is considered to be grasped (one hand)");
43 }
44 };
45
47 {
48 public:
50
51 // ManagedIceObject interface
52 protected:
53 void onInitWorldStateUpdater() override;
54 void onConnectWorldStateUpdater() override;
55 std::string getDefaultName() const override;
56
63
64 // WorldStateUpdaterInterface interface
65 public:
66 PredicateInfoList getPredicateInfos(const Ice::Current& = Ice::emptyCurrent) override;
67 PredicateInstanceList calcPredicates(const Ice::Current& = Ice::emptyCurrent) override;
68
69 private:
70 struct ObjectInfo
71 {
72 enum class ObjectType
73 {
74 OneHandGraspable,
75 TwoHandGraspable,
76 Other
77 };
78
79 ObjectInstancePtr objectInstance;
80 ObjectType type;
81 };
82
83 WorkingMemoryInterfacePrx wm;
84 PriorKnowledgeInterfacePrx prior;
85
86 AgentInstancesSegmentBasePrx agentInstances;
87 ObjectInstanceMemorySegmentBasePrx objectInstances;
88 PersistentObjectClassSegmentBasePrx objectClasses;
89
90 float distanceThreshold;
91 float bothHandGraspedDistanceThreshold;
92
93 PredicateInfo graspedPredicate;
94 PredicateInfo graspedBothPredicate;
95 PredicateInfo handEmptyPredicate;
96 };
97
98} // namespace memoryx
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
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)
PredicateInfoList getPredicateInfos(const Ice::Current &=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
Retrieve default name of component.
PredicateInstanceList calcPredicates(const Ice::Current &=Ice::emptyCurrent) override
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
VirtualRobot headers.
IceInternal::Handle< ObjectInstance > ObjectInstancePtr