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

Add timestamp arrived to memory commits

parent 15c21062
No related branches found
No related tags found
No related merge requests found
...@@ -167,6 +167,7 @@ namespace armarx::armem::server::robot_state::proprioception ...@@ -167,6 +167,7 @@ namespace armarx::armem::server::robot_state::proprioception
up.entityID.coreSegmentName = up.entityID.coreSegmentName =
::armarx::armem::robot_state::constants::proprioceptionCoreSegment; ::armarx::armem::robot_state::constants::proprioceptionCoreSegment;
up.referencedTime = data.timestamp; up.referencedTime = data.timestamp;
up.arrivedTime = data.timestampArrived;
up.instancesData = {data.proprioception}; up.instancesData = {data.proprioception};
} }
......
...@@ -13,6 +13,7 @@ namespace armarx::armem::server::robot_state::proprioception ...@@ -13,6 +13,7 @@ namespace armarx::armem::server::robot_state::proprioception
struct RobotUnitData struct RobotUnitData
{ {
Time timestamp; Time timestamp;
Time timestampArrived;
aron::data::DictPtr proprioception; aron::data::DictPtr proprioception;
aron::data::DictPtr exteroception; aron::data::DictPtr exteroception;
}; };
......
...@@ -81,11 +81,14 @@ namespace armarx::armem::server::robot_state::proprioception ...@@ -81,11 +81,14 @@ namespace armarx::armem::server::robot_state::proprioception
{ {
ARMARX_CHECK_NOT_NULL(converterProprioception); ARMARX_CHECK_NOT_NULL(converterProprioception);
RobotUnitData result;
std::optional<RobotUnitDataStreaming::TimeStep> data; std::optional<RobotUnitDataStreaming::TimeStep> data;
{ {
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
data = fetchLatestData(); data = fetchLatestData();
result.timestampArrived = armarx::DateTime::Now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>( auto duration = std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now() - start); std::chrono::high_resolution_clock::now() - start);
if (debugObserver) if (debugObserver)
...@@ -102,7 +105,6 @@ namespace armarx::armem::server::robot_state::proprioception ...@@ -102,7 +105,6 @@ namespace armarx::armem::server::robot_state::proprioception
ARMARX_DEBUG << "RobotUnitReader: Converting data current timestep to commit"; ARMARX_DEBUG << "RobotUnitReader: Converting data current timestep to commit";
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
RobotUnitData result;
if (converterProprioception != nullptr) if (converterProprioception != nullptr)
{ {
......
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