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