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

Map timestamp from realtime part (MONOTONIC RAW) to epoch-timestamp (REAL_TIME)

parent 21ee714a
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@
#include <RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleDevices.h>
#include <RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleUnits.h>
#include <RobotAPI/components/units/RobotUnit/Units/RobotUnitSubUnit.h>
#include <RobotAPI/components/units/RobotUnit/util/NonRtTiming.h>
namespace armarx::RobotUnitModule
{
......@@ -632,7 +633,10 @@ namespace armarx::RobotUnitModule
const auto requestedJointControllers =
_module<ControlThreadDataBuffer>().copyRequestedJointControllers();
lastControlThreadTimestamp = controlThreadOutputBuffer.sensorValuesTimestamp;
// controlThreadOutputBuffer.sensorValuesTimestamp is in MONOTONIC_RAW (not relative to epoch).
// We have to map it to be relative to epoch (REAL_TIME).
lastControlThreadTimestamp =
armarx::mapRtTimestampToNonRtTimestamp(controlThreadOutputBuffer.sensorValuesTimestamp);
const bool publishToObserver = !(publishIterationCount % debugObserverSkipIterations);
//publish publishing meta state
......
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