Main Page
Classes
Files
File List
File Members
ArTimeToROSTime.h
Go to the documentation of this file.
1
2
#ifndef ARTIMETOROSTIMESTAMP_H
3
#define ARTIMETOROSTIMESTAMP_H
4
5
#include <
ros/ros.h
>
6
7
#ifdef ADEPT_PKG
8
#include "ariaUtil.h"
9
#else
10
#include "Aria/ariaUtil.h"
11
#endif
12
13
ros::Time
convertArTimeToROS
(
const
ArTime& t)
14
{
15
// ARIA/ARNL times are in reference to an arbitrary starting time, not OS
16
// clock, so find the time elapsed between now and t
17
// to adjust the time stamp in ROS time vs. now accordingly.
18
ArTime arianow;
19
const
double
dtsec = (double) t.mSecSince(arianow) / 1000.0;
20
//printf("was %f seconds ago\n", dtsec);
21
return
ros::Time
(
ros::Time::now
().toSec() - dtsec);
22
}
23
24
#endif
ros::Time
convertArTimeToROS
ros::Time convertArTimeToROS(const ArTime &t)
Definition:
ArTimeToROSTime.h:13
ros.h
ros::Time::now
static Time now()
rosaria
Author(s): Srećko Jurić-Kavelj
autogenerated on Fri Jun 7 2019 22:02:02