diff --git a/source/armarx/navigation/client/services/MemorySubscriber.cpp b/source/armarx/navigation/client/services/MemorySubscriber.cpp index e0c9579b5da46f27d3d8c6da293db0463ee729eb..9f530dd216430cb505379f1cadbba6b3c561b58f 100644 --- a/source/armarx/navigation/client/services/MemorySubscriber.cpp +++ b/source/armarx/navigation/client/services/MemorySubscriber.cpp @@ -19,7 +19,7 @@ namespace armarx::navigation::client MemorySubscriber::MemorySubscriber(const std::string& callerId, armem::client::MemoryNameSystem& mns) : - callerId(callerId), memoryNameSystem(mns), lastMemoryPoll(armem::Time::now()) + callerId(callerId), memoryNameSystem(mns), lastMemoryPoll(armem::Time::Now()) { const std::string memoryName = "Navigation"; @@ -144,7 +144,7 @@ namespace armarx::navigation::client { ARMARX_TRACE; - const armem::Time now = armem::Time::now(); + const armem::Time now = armem::Time::Now(); armem::client::query::Builder qb; // clang-format off diff --git a/source/armarx/navigation/components/GraphImportExport/GraphImportExport.cpp b/source/armarx/navigation/components/GraphImportExport/GraphImportExport.cpp index bf2bb976f01a4ae725f4b515d3693c923b7b2ef9..c1976d582786e72afa4f3c3872b428893cfe9ab8 100644 --- a/source/armarx/navigation/components/GraphImportExport/GraphImportExport.cpp +++ b/source/armarx/navigation/components/GraphImportExport/GraphImportExport.cpp @@ -215,7 +215,7 @@ namespace armarx::navigation void GraphImportExport::locationsMemoryxToArmem(const std::string& sceneName) { - const armem::Time time = armem::Time::now(); + const armem::Time time = armem::Time::Now(); armem::Commit commit; memoryx::GraphNodeBaseList graphNodes = proxies.graphSegment->getNodesByScene(sceneName); @@ -304,7 +304,7 @@ namespace armarx::navigation toAron(aron, graph); // Build commit - const armem::Time time = armem::Time::now(); + const armem::Time time = armem::Time::Now(); armem::EntityUpdate update; update.entityID = getGraphProviderSegmentID().withEntityName(sceneName); update.timeCreated = time; diff --git a/source/armarx/navigation/components/NavigationMemory/NavigationMemory.cpp b/source/armarx/navigation/components/NavigationMemory/NavigationMemory.cpp index 847ec7157d43cb34ff0ea9b1fb5ced5b409395e8..e0ba0315927b3499fddd7f0920242ce719bac2d1 100644 --- a/source/armarx/navigation/components/NavigationMemory/NavigationMemory.cpp +++ b/source/armarx/navigation/components/NavigationMemory/NavigationMemory.cpp @@ -31,6 +31,7 @@ #include <ArmarXCore/core/time/CycleUtil.h> #include <ArmarXCore/libraries/DecoupledSingleComponent/Decoupled.h> +#include <RobotAPI/libraries/aron/common/aron_conversions.h> #include <RobotAPI/libraries/armem/client/query.h> #include <RobotAPI/libraries/armem/core/operations.h> #include <RobotAPI/libraries/armem/server/ltm/disk/Memory.h> @@ -181,9 +182,9 @@ namespace armarx::navigation // send commit to memory auto& up = c.add(); up.confidence = 1.0; - up.timeCreated = armem::Time::now(); - up.timeSent = armem::Time::now(); - up.timeArrived = armem::Time::now(); + up.timeCreated = armem::Time::Now(); + up.timeSent = armem::Time::Now(); + up.timeArrived = armem::Time::Now(); up.entityID = providerID.withEntityName(location.filename().string()); up.instancesData = {loc.toAron()}; } @@ -244,7 +245,7 @@ namespace armarx::navigation v.locationID.coreSegmentName = split[1]; v.locationID.providerSegmentName = split[2]; v.locationID.entityName = split[3]; - v.locationID.timestamp = armem::Time::microSeconds(-1); + toAron(v.locationID.timestamp, armem::Time::Invalid()); v.locationID.instanceIndex = 0; g.vertices.push_back(v); @@ -264,9 +265,9 @@ namespace armarx::navigation auto& up = c.add(); up.confidence = 1.0; - up.timeCreated = armem::Time::now(); - up.timeSent = armem::Time::now(); - up.timeArrived = armem::Time::now(); + up.timeCreated = armem::Time::Now(); + up.timeSent = armem::Time::Now(); + up.timeArrived = armem::Time::Now(); up.entityID = providerID.withEntityName(singleGraph.filename().string()); up.instancesData = {g.toAron()}; } diff --git a/source/armarx/navigation/components/Navigator/Navigator.cpp b/source/armarx/navigation/components/Navigator/Navigator.cpp index dc391906154fc875fda2f76e73767497927a8308..347c8df286eae6ce4151c87cc62c5586d54dac12 100644 --- a/source/armarx/navigation/components/Navigator/Navigator.cpp +++ b/source/armarx/navigation/components/Navigator/Navigator.cpp @@ -543,7 +543,7 @@ namespace armarx::navigation::components const armem::vision::occupancy_grid::client::Reader::Result result = occupancyGridReader.query(armem::vision::occupancy_grid::client::Reader::Query{ .providerName = "CartographerMappingAndLocalization", - .timestamp = armem::Time::now()}); + .timestamp = armem::Time::Now()}); if (result and result.occupancyGrid.has_value() and false) // Feature disabled on master ... { @@ -641,13 +641,13 @@ namespace armarx::navigation::components ARMARX_TRACE; synchronizeLocalClone(scene.robot); - auto robotDescription = virtualRobotReader.queryDescription("Armar6", armem::Time::now()); + auto robotDescription = virtualRobotReader.queryDescription("Armar6", armem::Time::Now()); ARMARX_CHECK(robotDescription.has_value()); // synchronizing platform state const std::optional<armem::robot::PlatformState> platformState = - virtualRobotReader.queryPlatformState(robotDescription.value(), armem::Time::now()); + virtualRobotReader.queryPlatformState(robotDescription.value(), armem::Time::Now()); ARMARX_CHECK(platformState.has_value()); diff --git a/source/armarx/navigation/gui-plugins/LocationGraphEditor/WidgetController.cpp b/source/armarx/navigation/gui-plugins/LocationGraphEditor/WidgetController.cpp index 894b527dcac09505145bfda3e270002a6e3325d9..33c40dfc3147484998f36f4ea1fe66ceead87404 100644 --- a/source/armarx/navigation/gui-plugins/LocationGraphEditor/WidgetController.cpp +++ b/source/armarx/navigation/gui-plugins/LocationGraphEditor/WidgetController.cpp @@ -522,7 +522,7 @@ namespace armarx::navigation::qt_plugins::location_graph_editor { armem::EntityUpdate& update = commit.add(); fromAron(vertex.attrib().aron.locationID, update.entityID); - update.timeCreated = armem::Time::now(); + update.timeCreated = armem::Time::Now(); navigation::location::arondto::Location dto; dto.globalRobotPose = vertex.attrib().getPose().matrix(); @@ -560,7 +560,7 @@ namespace armarx::navigation::qt_plugins::location_graph_editor armem::EntityUpdate update; update.entityID = model.graphEntityID; - update.timeCreated = armem::Time::now(); + update.timeCreated = armem::Time::Now(); update.instancesData = {dto.toAron()}; armem::EntityUpdateResult result = remote.graphWriter.commit(update); diff --git a/source/armarx/navigation/memory/client/events/Writer.cpp b/source/armarx/navigation/memory/client/events/Writer.cpp index 1858dd5d443d58acbd58d14e737916e0c3b377de..d41443621d830f43750a94cab5f629193ab93068 100644 --- a/source/armarx/navigation/memory/client/events/Writer.cpp +++ b/source/armarx/navigation/memory/client/events/Writer.cpp @@ -101,7 +101,7 @@ namespace armarx::navigation::mem::client::events ARMARX_INFO << "Storing event `" << eventName << "` in memory."; - armem::Time ts = armem::Time::microSeconds(event.timestamp.count()); + armem::Time ts = armem::Time(armem::Duration::MicroSeconds(event.timestamp.count())); armem::EntityUpdate update; update.entityID = armem::MemoryID() diff --git a/source/armarx/navigation/memory/client/parameterization/Writer.cpp b/source/armarx/navigation/memory/client/parameterization/Writer.cpp index b1b8610d6b680047078e44283b50700e068d17fd..5551fd6cdf43c8978d9a63b3e32d5100731f08c5 100644 --- a/source/armarx/navigation/memory/client/parameterization/Writer.cpp +++ b/source/armarx/navigation/memory/client/parameterization/Writer.cpp @@ -14,7 +14,7 @@ namespace armarx::navigation::mem::client::param { ARMARX_CHECK(not stack.empty()); - armem::Time ts = armem::Time::microSeconds(timestamp.count()); + const armem::Time ts(Duration::MicroSeconds(timestamp.count())); ARMARX_INFO << "timestamp chrono " << timestamp; ARMARX_INFO << "timestamp " << ts; diff --git a/source/armarx/navigation/memory/client/stack_result/Writer.cpp b/source/armarx/navigation/memory/client/stack_result/Writer.cpp index 95048a88103b77b72e1e2ecd14ae7e3cf2df4c2a..5e5f1adcf514f7331149d2c641089b75c1ab7ad7 100644 --- a/source/armarx/navigation/memory/client/stack_result/Writer.cpp +++ b/source/armarx/navigation/memory/client/stack_result/Writer.cpp @@ -61,7 +61,7 @@ namespace armarx::navigation::mem::client::stack_result armem::Commit& commit) { // FIXME timestamp should be part of GlobalPlannerResult - armem::Time timestamp = armem::Time::now(); + armem::Time timestamp = armem::Time::Now(); armem::EntityUpdate update; update.entityID = armem::MemoryID() @@ -90,7 +90,7 @@ namespace armarx::navigation::mem::client::stack_result armem::Commit& commit) { // FIXME timestamp should be part of GlobalPlannerResult - armem::Time timestamp = armem::Time::now(); + armem::Time timestamp = armem::Time::Now(); armem::EntityUpdate update; update.entityID = armem::MemoryID()