diff --git a/source/RobotAPI/libraries/CMakeLists.txt b/source/RobotAPI/libraries/CMakeLists.txt index 86bdc8fa48e612b256365f1beb1c43bfd1d09ec2..099ad8b4b981aeed1cc9e274c25672a1014ee120 100644 --- a/source/RobotAPI/libraries/CMakeLists.txt +++ b/source/RobotAPI/libraries/CMakeLists.txt @@ -23,6 +23,7 @@ add_subdirectory(armem_gui) add_subdirectory(armem_motions) add_subdirectory(armem_mps) add_subdirectory(armem_objects) +add_subdirectory(armem_reasoning) add_subdirectory(armem_robot) add_subdirectory(armem_robot_state) add_subdirectory(armem_skills) diff --git a/source/RobotAPI/libraries/armem_reasoning/CMakeLists.txt b/source/RobotAPI/libraries/armem_reasoning/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e5ab719013696a566001fee17a6ee0bb26b81929 --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/CMakeLists.txt @@ -0,0 +1,25 @@ +set(LIB_NAME armem_reasoning) + +armarx_component_set_name("${LIB_NAME}") +armarx_set_target("Library: ${LIB_NAME}") + + +armarx_add_library( + LIBS + ArmarXCoreInterfaces ArmarXCore + RobotAPICore aron armem + + SOURCES + aron_conversions.cpp + + HEADERS + aron_conversions.h + + ARON_FILES + aron/Anticipation.xml +) + + +add_library(VisionX::armem_reasoning ALIAS ${LIB_NAME}) + +add_subdirectory(server) diff --git a/source/RobotAPI/libraries/armem_reasoning/aron/Anticipation.xml b/source/RobotAPI/libraries/armem_reasoning/aron/Anticipation.xml new file mode 100644 index 0000000000000000000000000000000000000000..a3f481c630d573970ace675032a13becc9ca57fe --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/aron/Anticipation.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<AronTypeDefinition> + + <CodeIncludes> + <Include include="<RobotAPI/libraries/armem/aron/MemoryID.aron.generated.h>" /> + </CodeIncludes> + <AronIncludes> + <Include include="<RobotAPI/libraries/armem/aron/MemoryID.xml>" autoinclude="true" /> + </AronIncludes> + + <GenerateTypes> + <Object name='armarx::reasoning::arondto::Anticipation'> + <ObjectChild key='predictions'> + <List optional='true'> + <string /> + </List> + </ObjectChild> + </Object> + </GenerateTypes> +</AronTypeDefinition> diff --git a/source/RobotAPI/libraries/armem_reasoning/aron_conversions.cpp b/source/RobotAPI/libraries/armem_reasoning/aron_conversions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e721f12a9349747d7d2b3c6e69a4bc223e5d76ad --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/aron_conversions.cpp @@ -0,0 +1,28 @@ +/* + * 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 VisionX::ArmarXObjects::armem_images_server + * @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 "aron_conversions.h" + +namespace armarx::armem::server::reasoning +{ + +} diff --git a/source/RobotAPI/libraries/armem_reasoning/aron_conversions.h b/source/RobotAPI/libraries/armem_reasoning/aron_conversions.h new file mode 100644 index 0000000000000000000000000000000000000000..2e4d7c8bbd2206ed184cfe7e01c2898d81523b04 --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/aron_conversions.h @@ -0,0 +1,31 @@ +/* + * 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 VisionX::ArmarXObjects::armem_images_server + * @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 <RobotAPI/libraries/aron/core/data/variant/forward_declarations.h> +#include <RobotAPI/libraries/armem_reasoning/aron/Anticipation.aron.generated.h> + +namespace armarx::armem::server::reasoning +{ + +} diff --git a/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.cpp b/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bf2d89bb748ccf788288bc9632acf55937877125 --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.cpp @@ -0,0 +1,39 @@ +/* + * 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::armem_images_server + * @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 "AnticipationSegment.h" + +#include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h> + +namespace armarx::armem::server::reasoning +{ + AnticipationSegment::AnticipationSegment(armem::server::MemoryToIceAdapter& iceMemory) : + Base(iceMemory, CORE_SEGMENT_NAME) + { + + } + + void AnticipationSegment::defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix) + { + Base::defineProperties(defs, prefix); + } +} diff --git a/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.h b/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.h new file mode 100644 index 0000000000000000000000000000000000000000..3a05c7adb5b9e7d96d51c2e07a6c18f016bc506a --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/server/AnticipationSegment.h @@ -0,0 +1,46 @@ +/* + * 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 VisionX::ArmarXObjects::armem_images_server + * @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 <mutex> +#include <string> + +#include <RobotAPI/libraries/armem/server/segment/SpecializedSegment.h> + +#include <RobotAPI/libraries/armem_reasoning/aron/Anticipation.aron.generated.h> + +namespace armarx::armem::server::reasoning +{ + class AnticipationSegment : public armem::server::segment::SpecializedCoreSegment + { + public: + using Base = armem::server::segment::SpecializedCoreSegment; + + AnticipationSegment(armem::server::MemoryToIceAdapter& iceMemory); + + virtual void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string& prefix = "") override; + + public: + const std::string CORE_SEGMENT_NAME = "Anticipation"; + }; +} diff --git a/source/RobotAPI/libraries/armem_reasoning/server/CMakeLists.txt b/source/RobotAPI/libraries/armem_reasoning/server/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..248aa1d9ddeb9fbaf90eb4a31d2b5b9219f2937e --- /dev/null +++ b/source/RobotAPI/libraries/armem_reasoning/server/CMakeLists.txt @@ -0,0 +1,22 @@ +set(ARMARX_LIB_NAME "" ) +set(ARON_FILES "") + +set(LIB_NAME armem_reasoning_server) + +armarx_component_set_name("${LIB_NAME}") +armarx_set_target("Library: ${LIB_NAME}") + +armarx_add_library( + LIBS + armem_reasoning + armem_server + + SOURCES + AnticipationSegment.cpp + + HEADERS + AnticipationSegment.h +) + + +add_library(VisionX::armem_reasoning_server ALIAS ${LIB_NAME})