Skip to content
Snippets Groups Projects

Load location names, add NavigateToNamedLocation skill

Merged Rainer Kartmann requested to merge location-names into master
14 files
+ 376
62
Compare changes
  • Side-by-side
  • Inline
Files
14
@@ -27,21 +27,21 @@
#include <iostream>
#include <iterator>
#include "ArmarXCore/core/Component.h"
#include "ArmarXCore/core/time/Metronome.h"
#include "ArmarXCore/core/time/forward_declarations.h"
#include <ArmarXCore/core/Component.h>
#include <ArmarXCore/core/eigen/ice_conversions.h>
#include <ArmarXCore/core/system/ArmarXDataPath.h>
#include <ArmarXCore/core/time/CycleUtil.h>
#include <ArmarXCore/core/time/Metronome.h>
#include <ArmarXCore/core/time/forward_declarations.h>
#include <ArmarXCore/libraries/DecoupledSingleComponent/Decoupled.h>
#include "RobotAPI/libraries/armem/core/MemoryID.h"
#include "RobotAPI/libraries/armem/core/wm/aron_conversions.h"
#include <RobotAPI/libraries/PriorKnowledge/navigation_graphs/NavigationGraphFinder.h>
#include <RobotAPI/libraries/PriorKnowledge/util/LocationLoader/LocationLoader.h>
#include <RobotAPI/libraries/armem/client/query.h>
#include <RobotAPI/libraries/armem/core/MemoryID.h>
#include <RobotAPI/libraries/armem/core/aron_conversions.h>
#include <RobotAPI/libraries/armem/core/operations.h>
#include <RobotAPI/libraries/armem/core/wm/aron_conversions.h>
#include <RobotAPI/libraries/armem/server/ltm/disk/Memory.h>
#include <RobotAPI/libraries/armem/server/wm/memory_definitions.h>
#include <RobotAPI/libraries/aron/common/aron_conversions.h>
@@ -415,8 +415,6 @@ namespace armarx::navigation::components::navigation_memory
for (const auto& location : locations)
{
navigation::location::arondto::Location loc;
// we assert that only framedLocations are allowed. Everything else will be rejected!
if (location->type !=
armarx::priorknowledge::util::LocationType::FRAMED_LOCATION)
@@ -427,19 +425,21 @@ namespace armarx::navigation::components::navigation_memory
"'armarx::priorknowledge::util::LocationType:"
":FRAMED_LOCATION' (e.g. you specified a "
"FRAMED_BOXED_LOCATION?). Only FramedLocations (i.e. "
"poses in 3d space) are "
"navigatable. Ignoring this location but "
"please check the location.json file...";
"poses in 3D space) are navigatable. Ignoring this location "
"but please check the location.json file.";
continue;
}
auto& framedLocation =
dynamic_cast<armarx::priorknowledge::util::FramedLocation&>(*location);
navigation::location::arondto::Location loc;
// set members of loc
loc.framedPose.header.frame = framedLocation.frame;
loc.framedPose.header.agent = framedLocation.agent;
loc.framedPose.pose = framedLocation.pose;
toAron(loc.names, framedLocation.names);
// send commit to memory
auto& up = c.add();
Loading