31#include <RobotAPI/interface/core/RobotState.h>
32#include <RobotAPI/interface/units/TCPControlUnit.h>
54 "RobotStateComponent",
55 "Name of the RobotStateComponent");
59 "Name of the WorkingMemory component that should be used");
63 "Name of the LongtermMemory component that should be used");
65 "RobotStateObserverName",
67 "Name of the RobotStateObserver that can be used for observing the head motion");
71 "Name of the gaze tcp that can be used for observing the head motion");
74 "Name of the CommonPlacesLearner that will be "
75 "trained when object instances are updated");
77 "CheckFieldOfView",
false,
"Check if detected object is inside field of view.");
80 "Existence certainty will be reduced by this factor when "
81 "a localization returns without result");
84 30.0f *
M_PI / 180.0f,
85 "Very conservative estimation of the camera opening angle, in radians");
87 "MaximalObjectDistance",
89 "Maximal distance an object may have from the camera to be localized");
92 "Name of the robot node of the left camera");
95 "Name of the robot node of the right camera");
97 "HeadMotionVelocityLimit",
99 "Maximal velocity of the head up to which localizations are executed. Speed is in "
100 "mm/s at a the virtual gaze tcp");
102 "HandNodeNameLeft",
"TCP L",
"Name of the robot node for the left hand/TCP");
104 "HandNodeNameRight",
"TCP R",
"Name of the robot node for the right hand/TCP");
107 "KBMReferenceNodeName",
109 "Name of the robot node on which the KBM resides. Data should be provided wrt. to "
110 "its coordinate frame (i.e., not be transformed by the robot model which "
111 "introduces a new source of error).");
113 "KBMLeftArmNodeSetName",
115 "Name of the robot node set for the kinematic chain for the left arm.");
117 "KBMRightArmNodeSetName",
119 "Name of the robot node set for the kinematic chain for the right arm.");
136 virtual public ObjectLocalizationMemoryUpdaterBase
140 void setSegmentNames(std::string classSegmentName, std::string instanceSegmentName);
153 return "ObjectLocalizationMemoryUpdater";
159 void onInitComponent()
override;
160 void onConnectComponent()
override;
161 void onDisconnectComponent()
override;
166 const EntityBasePtr& entity,
167 const Ice::Current&
c = Ice::emptyCurrent)
override
171 void reportEntityUpdated(
const std::string& segmentName,
172 const EntityBasePtr& entityOld,
173 const EntityBasePtr& entityNew,
174 const Ice::Current&
c = Ice::emptyCurrent)
override;
178 const EntityBasePtr& entity,
179 const Ice::Current&
c = Ice::emptyCurrent)
override
185 const Ice::Current&
c = Ice::emptyCurrent)
override
196 const Ice::Current&
c = Ice::emptyCurrent)
override
208 void localizationFinished(
const Ice::AsyncResultPtr& r);
216 bool isRecognitionMethodRunning(
const std::string& recognitionMethod);
217 void setRecognitionMethodRunningState(
const std::string& recognitionMethod,
bool running);
220 ObjectLocalizerInterfacePrx getProxyCached(
const std::string& recognitionMethod);
221 LocalizationQueryList getMissingQueries(
const LocalizationQueryList& queriesBase,
222 const LocalizationQueryList& queriesCompare);
229 std::string workingMemoryName;
230 std::string classSegmentName;
231 std::string instanceSegmentName;
232 std::string agentInstancesSegmentName;
234 ObjectClassMemorySegmentBasePtr objectClassSegment;
236 std::string referenceFrameName;
237 std::string agentName;
241 std::mutex jobsMutex;
242 std::mutex predictionMutex;
243 std::vector<LocalizationJobPtr> jobs;
246 std::mutex recognitionMethodStateMutex;
247 std::map<std::string, bool> recognitionMethodRunning;
250 std::map<std::string, ObjectLocalizerInterfacePrx> knownObjectProxies;
254 armarx::ObserverInterfacePrx robotStateObserverProxy;
256 float headMotionVelocityLimit;
259 memoryx::CommonPlacesLearnerInterfacePrx commonPlacesLearnerProxy;
262 bool checkFieldOfView;
263 float cameraOpeningAngle;
264 std::string robotNodeNameLeftCamera, robotNodeNameRightCamera, handNodeNameLeft,
267 LongtermMemoryInterfacePrx longtermMemoryPrx;
273 template <
typename T>
277 str <<
"Set(" << set.size() <<
"):\n";
279 for (
const auto& elem : set)
281 str <<
"\t" << elem <<
"\n";
#define ARMARXCORE_IMPORT_EXPORT
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
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)
The ObjectLocalizationMemoryUpdater triggers the localization of object classes based on the content ...
void reportEntityCreated(const std::string &segmentName, const EntityBasePtr &entity, const Ice::Current &c=Ice::emptyCurrent) override
void reportMemoryCleared(const std::string &segmentName, const Ice::Current &c=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void reportSnapshotCompletelyLoaded(const Ice::Current &c=Ice::emptyCurrent) override
void reportSnapshotLoaded(const std::string &segmentName, const Ice::Current &c=Ice::emptyCurrent) override
ObjectLocalizationMemoryUpdater()
void reportEntityRemoved(const std::string &segmentName, const EntityBasePtr &entity, const Ice::Current &c=Ice::emptyCurrent) override
void setReferenceFrame(const std::string &referenceFrameName)
std::string getDefaultName() const override
Retrieve default name of component.
void setSegmentNames(std::string classSegmentName, std::string instanceSegmentName)
WorkingMemoryUpdater()
Constructs a new working memory updater method.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< FramedPosition > FramedPositionPtr
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx
IceInternal::Handle< DataFieldIdentifier > DataFieldIdentifierPtr
Typedef of DataFieldIdentifierPtr as IceInternal::Handle<DataFieldIdentifier> for convenience.
IceUtil::Handle< LocalizationJobContainer > LocalizationJobContainerPtr
IceInternal::Handle< ObjectInstanceMemorySegment > ObjectInstanceMemorySegmentPtr
IceInternal::Handle< AgentInstancesSegment > AgentInstancesSegmentPtr
IceInternal::Handle< ObjectLocalizationMemoryUpdater > ObjectLocalizationMemoryUpdaterPtr
IceInternal::Handle< ObjectInstance > ObjectInstancePtr
ARMARXCORE_IMPORT_EXPORT ostream & operator<<(ostream &stream, const armarx::RunningTaskIceBase &task)
ObjectLocalizationMemoryUpdaterProperties(std::string prefix)
WorkingMemoryUpdaterProperties(std::string prefix)