Skip to content
Snippets Groups Projects
Commit c205525d authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Fix deprecation warnings of using legacy time API

parent 7ce367da
No related branches found
No related tags found
1 merge request!17Fix deprecation warnings of using legacy time API
......@@ -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
......
......@@ -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;
......
......@@ -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()};
}
......
......@@ -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());
......
......@@ -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);
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment