Skip to content
Snippets Groups Projects
Commit dd43acd4 authored by Markus Grotz's avatar Markus Grotz
Browse files

add ReasoningMemory

parent da0eb151
No related branches found
No related tags found
No related merge requests found
add_subdirectory(ExampleMemory)
add_subdirectory(GeneralPurposeMemory)
add_subdirectory(ObjectMemory)
add_subdirectory(ReasoningMemory)
add_subdirectory(RobotStateMemory)
add_subdirectory(SkillsMemory)
add_subdirectory(GraspMemory)
......
armarx_component_set_name("ReasoningMemory")
set(COMPONENT_LIBS
ArmarXCore ArmarXCoreInterfaces # for DebugObserverInterface
ArmarXGuiComponentPlugins
RobotAPICore RobotAPIInterfaces armem_server
RobotAPIComponentPlugins # for ArViz and other plugins
armem_reasoning
armem_reasoning_server
)
set(SOURCES
ReasoningMemory.cpp
)
set(HEADERS
ReasoningMemory.h
)
armarx_add_component("${SOURCES}" "${HEADERS}")
#generate the application
armarx_generate_and_add_component_executable(
COMPONENT_NAMESPACE ::armarx::armem::server
)
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::ArmarXObjects::ExampleMemory
* @author Markus Grotz ( markus dot grotz at kit dot edu )
* @date 2022
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "ReasoningMemory.h"
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <SimoxUtility/algorithm/string.h>
#include <RobotAPI/libraries/armem/server/wm/memory_definitions.h>
#include <RobotAPI/libraries/armem/core/error.h>
namespace armarx::armem::server
{
armarx::PropertyDefinitionsPtr ReasoningMemory::createPropertyDefinitions()
{
armarx::PropertyDefinitionsPtr defs = new ComponentPropertyDefinitions(getConfigIdentifier());
setMemoryName("Reasoning");
return defs;
}
ReasoningMemory::ReasoningMemory() :
anticipationSegment(iceAdapter())
{
}
std::string ReasoningMemory::getDefaultName() const
{
return "ReasoningMemory";
}
void ReasoningMemory::onInitComponent()
{
//poseSegment.onInit();
//identificationSegment.onInit();
{
wm::CoreSegment& cs = workingMemory().addCoreSegment("Anticipation", armarx::reasoning::arondto::Anticipation::ToAronType());
cs.setMaxHistorySize(20);
}
{
wm::CoreSegment& cs = workingMemory().addCoreSegment("Anticipation", armarx::reasoning::arondto::Anticipation::ToAronType());
cs.setMaxHistorySize(20);
}
}
void ReasoningMemory::onConnectComponent()
{
}
void ReasoningMemory::onDisconnectComponent()
{
}
void ReasoningMemory::onExitComponent()
{
}
}
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::ArmarXObjects::ExampleMemory
* @author Markus Grotz ( markus dot grotz at kit dot edu )
* @date 2022
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#pragma once
#include <ArmarXCore/core/Component.h>
#include <RobotAPI/libraries/armem/server/plugins/ReadWritePluginUser.h>
#include <RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.h>
namespace armarx::armem::server
{
class ReasoningMemory :
virtual public armarx::Component,
virtual public armem::server::ReadWritePluginUser
{
public:
ReasoningMemory();
/// @see armarx::ManagedIceObject::getDefaultName()
std::string getDefaultName() const override;
protected:
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override;
void onInitComponent() override;
void onConnectComponent() override;
void onDisconnectComponent() override;
void onExitComponent() override;
private:
reasoning::AnticipationSegment anticipationSegment;
};
}
......@@ -20,6 +20,6 @@ armarx_add_library(
)
add_library(VisionX::armem_reasoning ALIAS ${LIB_NAME})
add_library(RobotAPI::armem_reasoning ALIAS ${LIB_NAME})
add_subdirectory(server)
......@@ -19,4 +19,4 @@ armarx_add_library(
)
add_library(VisionX::armem_reasoning_server ALIAS ${LIB_NAME})
add_library(RobotAPI::armem_reasoning_server ALIAS ${LIB_NAME})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment