ReasoningMemory.cpp
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 RobotAPI::ArmarXObjects::ExampleMemory
17  * @author Markus Grotz ( markus dot grotz at kit dot edu )
18  * @date 2022
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #include "ReasoningMemory.h"
24 
26 
27 #include <SimoxUtility/algorithm/string.h>
28 
31 
32 
33 namespace armarx::armem::server
34 {
36  {
38 
39  setMemoryName("Reasoning");
40  return defs;
41  }
42 
43 
45  anticipationSegment(iceAdapter())
46  {
47 
48  }
49 
50  std::string ReasoningMemory::getDefaultName() const
51  {
52  return "ReasoningMemory";
53  }
54 
56  {
57 
58  {
59  wm::CoreSegment& cs = workingMemory().addCoreSegment("Anticipation", armarx::reasoning::arondto::Anticipation::ToAronType());
60  cs.setMaxHistorySize(20);
61  }
62 
63 
64  }
65 
67  {
68  }
69 
71  {
72  }
73 
75  {
76  }
77 }
ReasoningMemory.h
armarx::armem::server::ReasoningMemory::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ReasoningMemory.cpp:66
armarx::armem::server::ReasoningMemory::getDefaultName
std::string getDefaultName() const override
Definition: ReasoningMemory.cpp:50
armarx::armem::server::wm::detail::MaxHistorySizeParent::setMaxHistorySize
void setMaxHistorySize(long maxSize)
Sets the maximum history size of entities in this container.
Definition: MaxHistorySize.h:46
armarx::armem::server::ReasoningMemory::ReasoningMemory
ReasoningMemory()
Definition: ReasoningMemory.cpp:44
armarx::armem::server::ReasoningMemory::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ReasoningMemory.cpp:35
armarx::armem::server::plugins::ReadWritePluginUser::setMemoryName
void setMemoryName(const std::string &memoryName)
Definition: ReadWritePluginUser.cpp:25
armarx::armem::server::plugins::ReadWritePluginUser::workingMemory
server::wm::Memory & workingMemory()
Definition: ReadWritePluginUser.cpp:106
armarx::armem::server::ReasoningMemory::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: ReasoningMemory.cpp:70
memory_definitions.h
error.h
armarx::armem::base::MemoryBase::addCoreSegment
CoreSegmentT & addCoreSegment(const std::string &name, aron::type::ObjectPtr coreSegmentType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Add an empty core segment with the given name, type and prediction engines.
Definition: MemoryBase.h:259
armarx::armem::server::ReasoningMemory::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: ReasoningMemory.cpp:74
armarx::armem::server
Definition: GraspMemory.cpp:19
ExpressionException.h
armarx::armem::server::wm::CoreSegment
base::CoreSegmentBase
Definition: memory_definitions.h:86
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::server::ReasoningMemory::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ReasoningMemory.cpp:55