Decay.h
Go to the documentation of this file.
1#pragma once
2
6
8
10
12{
13
14 /**
15 * @brief Models decay of object localizations by decreasing the confidence
16 * the longer the object was not localized.
17 */
18 class Decay : public armarx::Logging
19 {
20 public:
22 const std::string& prefix = "decay.");
23
24 void updateConfidence(objpose::ObjectPose& pose, const DateTime& now) const;
25 void updateConfidences(objpose::ObjectPoseSeq& objectPoses, const DateTime& now) const;
26
27 private:
28 float calculateConfidence(const DateTime& localization, const DateTime& now) const;
29
30
31 public:
32 bool enabled = false;
33
34 /// Duration after latest localization before decay starts.
35 float delaySeconds = 5.0;
36 /// How long to reach minConfidence.
37 float durationSeconds = 20.0;
38
39 float maxConfidence = 1.0;
40 float minConfidence = 0.0f;
41
43
60 };
61
62} // namespace armarx::armem::server::obj::instance
Base Class for all Logging classes.
Definition Logging.h:240
Models decay of object localizations by decreasing the confidence the longer the object was not local...
Definition Decay.h:19
float durationSeconds
How long to reach minConfidence.
Definition Decay.h:37
void updateConfidence(objpose::ObjectPose &pose, const DateTime &now) const
Definition Decay.cpp:30
float delaySeconds
Duration after latest localization before decay starts.
Definition Decay.h:35
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="decay.")
Definition Decay.cpp:12
void updateConfidences(objpose::ObjectPoseSeq &objectPoses, const DateTime &now) const
Definition Decay.cpp:43
Represents a point in time.
Definition DateTime.h:25
std::vector< ObjectPose > ObjectPoseSeq
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
armarx::RemoteGui::Client::GroupBox group
Definition Decay.h:46
armarx::RemoteGui::Client::FloatSpinBox delaySeconds
Definition Decay.h:50
armarx::RemoteGui::Client::FloatSlider minConfidence
Definition Decay.h:53
armarx::RemoteGui::Client::FloatSlider maxConfidence
Definition Decay.h:52
armarx::RemoteGui::Client::CheckBox enabled
Definition Decay.h:48
armarx::RemoteGui::Client::FloatSpinBox durationSeconds
Definition Decay.h:51
armarx::RemoteGui::Client::FloatSlider removeObjectsBelowConfidence
Definition Decay.h:55
An object pose as stored by the ObjectPoseStorage.
Definition ObjectPose.h:34