diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index bdf8a1cd639b473cf9ac4cb4af27f8d97da81fc1..f8a4b50ece99f95d8d4c618b377774e289ec4c03 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -1361,11 +1361,11 @@ namespace armarx newItem = new QTableWidgetItem(state); ui.tableJointList->setItem(i, eTabelColumnError, newItem); - state = currentStatus.enabled ? "X" : "-"; + state = currentStatus.enabled ? "yes" : "no"; newItem = new QTableWidgetItem(state); ui.tableJointList->setItem(i, eTabelColumnEnabled, newItem); - state = currentStatus.emergencyStop ? "X" : "-"; + state = currentStatus.emergencyStop ? "yes" : "no"; newItem = new QTableWidgetItem(state); ui.tableJointList->setItem(i, eTabelColumnEmergencyStop, newItem); } diff --git a/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.cpp b/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.cpp index e5d468c552d96d70d3ef4ae92196cdb714f39163..3d8907a348bad7051e3fc88239f3b816899acd5e 100644 --- a/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.cpp +++ b/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.cpp @@ -44,12 +44,6 @@ namespace armarx::armem::client::util } } - std::mutex& - SimpleWriterBase::memoryWriterMutex() - { - return memoryMutex; - } - armem::client::Writer& SimpleWriterBase::memoryWriter() { diff --git a/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.h b/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.h index 13a54cc5b213a90e1949f73c1b11de716c0593cc..895376b0a2f3ff1f30fdd070c2e50c62b9aa2968 100644 --- a/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.h +++ b/source/RobotAPI/libraries/armem/client/util/SimpleWriterBase.h @@ -58,7 +58,6 @@ namespace armarx::armem::client::util virtual std::string propertyPrefix() const = 0; virtual Properties defaultProperties() const = 0; - std::mutex& memoryWriterMutex(); armem::client::Writer& memoryWriter(); @@ -66,7 +65,6 @@ namespace armarx::armem::client::util Properties props; armem::client::Writer memoryWriterClient; - std::mutex memoryMutex; }; } // namespace armarx::armem::client::util diff --git a/source/RobotAPI/libraries/armem_objects/CMakeLists.txt b/source/RobotAPI/libraries/armem_objects/CMakeLists.txt index 63da8444d40d90e6c4e73a1a4fd755082f4914f9..bbb52cc2b5f473d71cbf1d7c73e39002368f71ad 100644 --- a/source/RobotAPI/libraries/armem_objects/CMakeLists.txt +++ b/source/RobotAPI/libraries/armem_objects/CMakeLists.txt @@ -36,6 +36,8 @@ armarx_add_library( server/attachments/Segment.h + client/class/ClassReader.h + client/class/ClassWriter.h client/articulated_object/Reader.h client/articulated_object/Writer.h client/articulated_object/ArticulatedObjectReader.h @@ -55,6 +57,8 @@ armarx_add_library( types.cpp utils.cpp + client/class/ClassReader.cpp + client/class/ClassWriter.cpp client/articulated_object/Reader.cpp client/articulated_object/Writer.cpp client/articulated_object/ArticulatedObjectReader.cpp diff --git a/source/RobotAPI/libraries/armem_objects/aron/ObjectClass.xml b/source/RobotAPI/libraries/armem_objects/aron/ObjectClass.xml index e2d695429d3c4193ad97df106821f5bb912a0028..019987f5054e844478066d377ad0bf1e948b6db7 100644 --- a/source/RobotAPI/libraries/armem_objects/aron/ObjectClass.xml +++ b/source/RobotAPI/libraries/armem_objects/aron/ObjectClass.xml @@ -13,6 +13,30 @@ Core segment type of Object/Class. </AronIncludes> <GenerateTypes> + <Object name="armarx::armem::arondto::Feature"> + <ObjectChild key="angle"> + <float32 /> + </ObjectChild> + + <ObjectChild key="scale"> + <float32 /> + </ObjectChild> + + <ObjectChild key="point2d"> + <vector2f /> + </ObjectChild> + + <ObjectChild key="point3d"> + <vector3f /> + </ObjectChild> + + <ObjectChild key="feature"> + <List> + <float32 /> + </List> + </ObjectChild> + </Object> + <Object name="armarx::armem::arondto::ObjectClass"> <ObjectChild key="id"> @@ -62,6 +86,12 @@ Core segment type of Object/Class. <armarx::arondto::ObjectNames /> </ObjectChild> + <ObjectChild key="ivtFeatures"> + <List> + <armarx::armem::arondto::Feature /> + </List> + </ObjectChild> + </Object> </GenerateTypes> diff --git a/source/RobotAPI/libraries/armem_objects/aron_conversions.cpp b/source/RobotAPI/libraries/armem_objects/aron_conversions.cpp index 6b3f3c184edb32070f6d7f28c853f340bcd78d32..da32c2771a2149f58e5ba3a1a01db93ecbe71028 100644 --- a/source/RobotAPI/libraries/armem_objects/aron_conversions.cpp +++ b/source/RobotAPI/libraries/armem_objects/aron_conversions.cpp @@ -111,6 +111,71 @@ namespace armarx::armem } // namespace armarx::armem +namespace armarx::armem::clazz +{ + + void + fromAron(const arondto::Feature& dto, Feature& bo) + { + bo.angle = dto.angle; + bo.scale = dto.scale; + bo.feature = dto.feature; + bo.point2d = dto.point2d; + bo.point3d = dto.point3d; + } + + void + toAron(arondto::Feature& dto, const Feature& bo) + { + dto.angle = bo.angle; + dto.scale = bo.scale; + dto.feature = bo.feature; + dto.point2d = bo.point2d; + dto.point3d = bo.point3d; + } + + void + fromAron(const arondto::ObjectClass& dto, ObjectClass& bo) + { + armarx::fromAron(dto.id, bo.id); + armarx::fromAron(dto.simoxXmlPath, bo.simoxXmlPath); + armarx::fromAron(dto.articulatedSimoxXmlPath, bo.articulatedSimoxXmlPath); + armarx::fromAron(dto.urdfPath, bo.urdfPath); + armarx::fromAron(dto.articulatedUrdfPath, bo.articulatedUrdfPath); + armarx::fromAron(dto.sdfPath, bo.sdfPath); + armarx::fromAron(dto.meshWrlPath, bo.meshWrlPath); + armarx::fromAron(dto.meshObjPath, bo.meshObjPath); + armarx::fromAron(dto.aabb, bo.aabb); + armarx::fromAron(dto.oobb, bo.oobb); + bo.ivtFeatures.clear(); + for (const auto& i : dto.ivtFeatures) + { + fromAron(i, bo.ivtFeatures.emplace_back()); + } + } + + void + toAron(arondto::ObjectClass& dto, const ObjectClass& bo) + { + armarx::toAron(dto.id, bo.id); + armarx::toAron(dto.simoxXmlPath, bo.simoxXmlPath); + armarx::toAron(dto.articulatedSimoxXmlPath, bo.articulatedSimoxXmlPath); + armarx::toAron(dto.urdfPath, bo.urdfPath); + armarx::toAron(dto.articulatedUrdfPath, bo.articulatedUrdfPath); + armarx::toAron(dto.sdfPath, bo.sdfPath); + armarx::toAron(dto.meshWrlPath, bo.meshWrlPath); + armarx::toAron(dto.meshObjPath, bo.meshObjPath); + armarx::toAron(dto.aabb, bo.aabb); + armarx::toAron(dto.oobb, bo.oobb); + dto.ivtFeatures.clear(); + for (const auto& i : bo.ivtFeatures) + { + toAron(dto.ivtFeatures.emplace_back(), i); + } + } + +} // namespace armarx::armem::clazz + armarx::armem::MemoryID armarx::armem::obj::makeObjectInstanceMemoryID(const objpose::ObjectPose& objectPose) { diff --git a/source/RobotAPI/libraries/armem_objects/aron_conversions.h b/source/RobotAPI/libraries/armem_objects/aron_conversions.h index e27ed16c4cede302e2eecf2c013440d240162550..b61164a5d6a7de07bd8ba3761117e263ac714949 100644 --- a/source/RobotAPI/libraries/armem_objects/aron_conversions.h +++ b/source/RobotAPI/libraries/armem_objects/aron_conversions.h @@ -1,11 +1,10 @@ #pragma once #include <RobotAPI/libraries/ArmarXObjects/ObjectPose.h> - -#include <RobotAPI/libraries/armem_objects/aron/ObjectInstance.aron.generated.h> #include <RobotAPI/libraries/armem_objects/aron/Attachment.aron.generated.h> #include <RobotAPI/libraries/armem_objects/aron/Marker.aron.generated.h> - +#include <RobotAPI/libraries/armem_objects/aron/ObjectClass.aron.generated.h> +#include <RobotAPI/libraries/armem_objects/aron/ObjectInstance.aron.generated.h> #include <RobotAPI/libraries/armem_objects/types.h> namespace armarx::armem @@ -18,19 +17,32 @@ namespace armarx::armem /* Attachments */ - void fromAron(const arondto::attachment::AgentDescription& dto, attachment::AgentDescription& bo); + void fromAron(const arondto::attachment::AgentDescription& dto, + attachment::AgentDescription& bo); void toAron(arondto::attachment::AgentDescription& dto, const attachment::AgentDescription& bo); - void fromAron(const arondto::attachment::ObjectAttachment& dto, attachment::ObjectAttachment& bo); + void fromAron(const arondto::attachment::ObjectAttachment& dto, + attachment::ObjectAttachment& bo); void toAron(arondto::attachment::ObjectAttachment& dto, const attachment::ObjectAttachment& bo); - void fromAron(const arondto::attachment::ArticulatedObjectAttachment& dto, attachment::ArticulatedObjectAttachment& bo); - void toAron(arondto::attachment::ArticulatedObjectAttachment& dto, const attachment::ArticulatedObjectAttachment& bo); + void fromAron(const arondto::attachment::ArticulatedObjectAttachment& dto, + attachment::ArticulatedObjectAttachment& bo); + void toAron(arondto::attachment::ArticulatedObjectAttachment& dto, + const attachment::ArticulatedObjectAttachment& bo); + + void fromAron(const arondto::Marker& dto, marker::Marker& bo); + void toAron(arondto::Marker& dto, const marker::Marker& bo); +} // namespace armarx::armem + +namespace armarx::armem::clazz +{ + void fromAron(const armarx::armem::arondto::Feature& dto, Feature& bo); + void toAron(armarx::armem::arondto::Feature& dto, const Feature& bo); - void fromAron(const arondto::Marker& dto, marker::Marker&bo); - void toAron(arondto::Marker& dto, const marker::Marker&bo); -} // namespace armarx::armem + void fromAron(const armarx::armem::arondto::ObjectClass& dto, ObjectClass& bo); + void toAron(armarx::armem::arondto::ObjectClass& dto, const ObjectClass& bo); +} // namespace armarx::armem::clazz #include <RobotAPI/libraries/armem/core/MemoryID.h> @@ -38,4 +50,4 @@ namespace armarx::armem::obj { /// Make a Memory ID for the object instance snapshot representing this pose. MemoryID makeObjectInstanceMemoryID(const objpose::ObjectPose& objectPose); -} +} // namespace armarx::armem::obj diff --git a/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.cpp b/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bceba7d960ffbe41a620c36d47a5d8fc0897c157 --- /dev/null +++ b/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.cpp @@ -0,0 +1,45 @@ +#include "ClassReader.h" + +namespace armarx::armem::obj::clazz +{ + std::optional<armem::clazz::ObjectClass> + ClassReader::getObjectClass(const std::string& providerName, const ObjectID& id) + { + auto mid = armarx::armem::MemoryID(); + mid.memoryName = properties().memoryName; + mid.coreSegmentName = properties().coreSegmentName; + mid.providerSegmentName = providerName; + mid.entityName = id.str(); + + auto i = this->memoryReader().getLatestSnapshotIn(mid); + + if (i.has_value() && i->size() == 1) + { + auto& instance = i->getInstance(0); + auto aron = instance.dataAs<armarx::armem::arondto::ObjectClass>(); + + armem::clazz::ObjectClass objClass; + armarx::armem::clazz::fromAron(aron, objClass); + + return objClass; + } + + return std::nullopt; + } + + std::string + ClassReader::propertyPrefix() const + { + return "classReader."; + } + + client::util::SimpleReaderBase::Properties + ClassReader::defaultProperties() const + { + client::util::SimpleReaderBase::Properties p; + p.memoryName = "Object"; + p.coreSegmentName = "Class"; + return p; + } + +} // namespace armarx::armem::obj::clazz diff --git a/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.h b/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.h new file mode 100644 index 0000000000000000000000000000000000000000..4d2805b4f03e81bb6b58b65d73997eeae56755ab --- /dev/null +++ b/source/RobotAPI/libraries/armem_objects/client/class/ClassReader.h @@ -0,0 +1,49 @@ +/* + * 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/>. + * + * @author Fabian Reister ( fabian dot reister at kit dot edu ) + * @date 2021 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ + +#pragma once + +#include <mutex> +#include <optional> + +#include <RobotAPI/libraries/armem/client/util/SimpleReaderBase.h> +#include <RobotAPI/libraries/armem_objects/aron_conversions.h> +#include <RobotAPI/libraries/armem_objects/types.h> + +namespace armarx::armem::obj::clazz +{ + class ClassReader : public armem::client::util::SimpleReaderBase + { + public: + ClassReader() = default; + + std::optional<armem::clazz::ObjectClass> getObjectClass(const std::string& providerName, + const armarx::ObjectID& id); + + protected: + std::string propertyPrefix() const final; + Properties defaultProperties() const final; + + private: + }; + + +} // namespace armarx::armem::obj::clazz diff --git a/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.cpp b/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f9f1d109bca843610638ab3473314ab5fe1c4a03 --- /dev/null +++ b/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.cpp @@ -0,0 +1,48 @@ +#include "ClassWriter.h" + +namespace armarx::armem::obj::clazz +{ + bool + ClassWriter::commitObjectClass(const armarx::armem::clazz::ObjectClass& c, + const armarx::core::time::DateTime& referenceTime) + { + armarx::armem::arondto::ObjectClass objClassAron; + armarx::armem::clazz::toAron(objClassAron, c); + + armarx::armem::MemoryID mid; + mid.memoryName = properties().memoryName; + mid.coreSegmentName = properties().coreSegmentName; + mid.providerSegmentName = properties().providerName; + mid.entityName = c.id.str(); + + auto commit = armarx::armem::Commit(); + auto& update = commit.add(); + + update.confidence = 1.0f; + update.referencedTime = referenceTime; + update.sentTime = armarx::core::time::DateTime::Now(); + update.entityID = mid; + update.instancesData = {objClassAron.toAron()}; + + auto res = this->memoryWriter().commit(commit); + + return res.allSuccess(); + } + + std::string + ClassWriter::propertyPrefix() const + { + return "classWriter."; + } + + client::util::SimpleWriterBase::Properties + ClassWriter::defaultProperties() const + { + client::util::SimpleWriterBase::Properties p; + p.memoryName = "Object"; + p.coreSegmentName = "Class"; + p.providerName = providerName; + return p; + } + +} // namespace armarx::armem::obj::clazz diff --git a/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.h b/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.h new file mode 100644 index 0000000000000000000000000000000000000000..db17223ba7f8dc550283fb2aa5c1ed3d11872f7e --- /dev/null +++ b/source/RobotAPI/libraries/armem_objects/client/class/ClassWriter.h @@ -0,0 +1,50 @@ +/* + * 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/>. + * + * @author Fabian Reister ( fabian dot reister at kit dot edu ) + * @date 2021 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ + +#pragma once + +#include <mutex> +#include <optional> + +#include <RobotAPI/libraries/armem/client/util/SimpleWriterBase.h> +#include <RobotAPI/libraries/armem_objects/aron_conversions.h> +#include <RobotAPI/libraries/armem_objects/types.h> + +namespace armarx::armem::obj::clazz +{ + class ClassWriter : public armem::client::util::SimpleWriterBase + { + public: + ClassWriter(const std::string& p) : providerName(p){}; + + bool commitObjectClass(const armarx::armem::clazz::ObjectClass& c, + const armarx::core::time::DateTime& referenceTime); + + protected: + std::string propertyPrefix() const final; + Properties defaultProperties() const final; + + private: + const std::string providerName; + }; + + +} // namespace armarx::armem::obj::clazz diff --git a/source/RobotAPI/libraries/armem_objects/types.h b/source/RobotAPI/libraries/armem_objects/types.h index 79fe9ac956f65869ceb03b35db8545155c4c963c..598c78ca9c6bc5f4fc007059352ee94fc28b2fec 100644 --- a/source/RobotAPI/libraries/armem_objects/types.h +++ b/source/RobotAPI/libraries/armem_objects/types.h @@ -23,6 +23,8 @@ #include <Eigen/Geometry> +#include <SimoxUtility/shapes/AxisAlignedBoundingBox.h> + #include <RobotAPI/libraries/ArmarXObjects/ObjectPose.h> #include <RobotAPI/libraries/armem/core/MemoryID.h> #include <RobotAPI/libraries/armem/core/Time.h> @@ -31,7 +33,6 @@ #include "aron_forward_declarations.h" - namespace armarx::armem { struct ObjectInstance @@ -40,7 +41,36 @@ namespace armarx::armem MemoryID classID; MemoryID sourceID; }; -} +} // namespace armarx::armem + +namespace armarx::armem::clazz +{ + struct Feature + { + float angle; + float scale; + Eigen::Vector2f point2d; + Eigen::Vector3f point3d; + std::vector<float> feature; + }; + + struct ObjectClass + { + armarx::ObjectID id; + armarx::PackagePath simoxXmlPath; + armarx::PackagePath articulatedSimoxXmlPath; + armarx::PackagePath urdfPath; + armarx::PackagePath articulatedUrdfPath; + armarx::PackagePath sdfPath; + armarx::PackagePath articulatedSdfPath; + armarx::PackagePath meshWrlPath; + armarx::PackagePath meshObjPath; + simox::AxisAlignedBoundingBox aabb; + simox::OrientedBoxf oobb; + // TODO NAMES + std::vector<Feature> ivtFeatures; + }; +} // namespace armarx::armem::clazz namespace armarx::armem::attachment { @@ -110,7 +140,6 @@ namespace armarx::armem::articulated_object using ArticulatedObjects = armarx::armem::robot::Robots; } // namespace armarx::armem::articulated_object - namespace armarx::armem::marker { class Marker diff --git a/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.cpp b/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.cpp index a682162553005783d3ad74e42d78bffefbc09ae2..ca80477ebbf264624dd5f722ce2dee86853e8586 100644 --- a/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.cpp +++ b/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.cpp @@ -1,19 +1,19 @@ #include "Writer.h" -#include <RobotAPI/libraries/armem_vision/aron_conversions.h> #include <RobotAPI/libraries/armem_vision/aron/OccupancyGrid.aron.generated.h> - +#include <RobotAPI/libraries/armem_vision/aron_conversions.h> namespace armarx::armem::vision::occupancy_grid::client { Writer::~Writer() = default; - bool Writer::store(const OccupancyGrid& grid, - const std::string& frame, - const std::string& providerName, - const std::int64_t& timestamp) + bool + Writer::store(const OccupancyGrid& grid, + const std::string& frame, + const std::string& providerName, + const std::int64_t& timestamp) { - std::lock_guard g{memoryWriterMutex()}; + std::lock_guard g{writeMutex}; const auto result = memoryWriter().addSegment(properties().coreSegmentName, providerName); @@ -28,7 +28,7 @@ namespace armarx::armem::vision::occupancy_grid::client const auto iceTimestamp = Time(Duration::MicroSeconds(timestamp)); const auto providerId = armem::MemoryID(result.segmentID); - const auto entityID = providerId.withEntityName(frame).withTimestamp(iceTimestamp); + const auto entityID = providerId.withEntityName(frame).withTimestamp(iceTimestamp); armem::EntityUpdate update; update.entityID = entityID; @@ -41,7 +41,7 @@ namespace armarx::armem::vision::occupancy_grid::client dict->addElement("grid", toAron(grid.grid)); update.instancesData = {dict}; - update.referencedTime = iceTimestamp; + update.referencedTime = iceTimestamp; ARMARX_DEBUG << "Committing " << update << " at time " << iceTimestamp; armem::EntityUpdateResult updateResult = memoryWriter().commit(update); @@ -56,7 +56,8 @@ namespace armarx::armem::vision::occupancy_grid::client return updateResult.success; } - std::string Writer::propertyPrefix() const + std::string + Writer::propertyPrefix() const { return "mem.vision.occupancy_grid."; } @@ -65,7 +66,7 @@ namespace armarx::armem::vision::occupancy_grid::client Writer::defaultProperties() const { - return SimpleWriterBase::Properties{.memoryName = "Vision", + return SimpleWriterBase::Properties{.memoryName = "Vision", .coreSegmentName = "OccupancyGrid"}; } } // namespace armarx::armem::vision::occupancy_grid::client diff --git a/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.h b/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.h index df5e02ceaa5b2034e0028e7625c616924af8a2bf..7f950eab82ea37520855a07daf1560b9f30aee53 100644 --- a/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.h +++ b/source/RobotAPI/libraries/armem_vision/client/occupancy_grid/Writer.h @@ -55,8 +55,10 @@ namespace armarx::armem::vision::occupancy_grid::client protected: std::string propertyPrefix() const override; Properties defaultProperties() const override; - }; + private: + std::mutex writeMutex; + }; } // namespace armarx::armem::vision::occupancy_grid::client diff --git a/source/RobotAPI/libraries/skills/provider/detail/SkillImplementationWrapper.cpp b/source/RobotAPI/libraries/skills/provider/detail/SkillImplementationWrapper.cpp index 60db0fa913274594078d59c3f7a930b86e1423be..82908d85ac3b526848561cd94593291c15b40f67 100644 --- a/source/RobotAPI/libraries/skills/provider/detail/SkillImplementationWrapper.cpp +++ b/source/RobotAPI/libraries/skills/provider/detail/SkillImplementationWrapper.cpp @@ -137,7 +137,8 @@ namespace armarx auto terminated = TerminatedSkillStatusUpdate{ {.executionId = statusUpdate.executionId, .parameters = statusUpdate.parameters, - .callbackInterface = statusUpdate.callbackInterface}}; + .callbackInterface = statusUpdate.callbackInterface, + .result = statusUpdate.result}}; terminated.status = TerminatedSkillStatus::Aborted; return terminated; }; @@ -151,7 +152,8 @@ namespace armarx auto terminated = TerminatedSkillStatusUpdate{ {.executionId = statusUpdate.executionId, .parameters = statusUpdate.parameters, - .callbackInterface = statusUpdate.callbackInterface}}; + .callbackInterface = statusUpdate.callbackInterface, + .result = statusUpdate.result}}; terminated.status = TerminatedSkillStatus::Failed; return terminated; };