From 8bb870707f24c388ef87cbd745dc52cc0bc7eb4a Mon Sep 17 00:00:00 2001 From: Rainer Kartmann <rainer.kartmann@kit.edu> Date: Thu, 16 Nov 2023 10:35:41 +0100 Subject: [PATCH] Also load names for FramedBoxedLocation --- .../util/LocationLoader/LocationLoader.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/RobotAPI/libraries/PriorKnowledge/util/LocationLoader/LocationLoader.cpp b/source/RobotAPI/libraries/PriorKnowledge/util/LocationLoader/LocationLoader.cpp index ebde885d2..9a667a933 100644 --- a/source/RobotAPI/libraries/PriorKnowledge/util/LocationLoader/LocationLoader.cpp +++ b/source/RobotAPI/libraries/PriorKnowledge/util/LocationLoader/LocationLoader.cpp @@ -123,12 +123,19 @@ namespace armarx::priorknowledge::util extents, framedOrientedBox.at("extents").get<std::vector<float>>()); // load the 4x4 matrix + std::optional<Names> names; + if (auto it = j.find("names"); it != j.end()) + { + it->get_to(names.emplace()); + } + FramedBoxedLocationPtr loc(new FramedBoxedLocation(LocationId(source, locationName), LocationType::FRAMED_BOXED_LOCATION, frame, agent, pose, - extents)); + extents, + names)); return loc; } -- GitLab