Public Member Functions | Private Attributes | List of all members
rosbag::TimeTranslator Class Reference

Helper class for translating between two times. More...

#include <time_translator.h>

Public Member Functions

void setRealStartTime (ros::Time const &t)
 
void setTimeScale (double const &s)
 
void setTranslatedStartTime (ros::Time const &t)
 Increments the translated start time by shift. Useful for pausing. More...
 
void shift (ros::Duration const &d)
 Increments the translated start time by shift. Useful for pausing. More...
 
 TimeTranslator ()
 
ros::Time translate (ros::Time const &t)
 

Private Attributes

ros::Time real_start_
 
double time_scale_
 
ros::Time translated_start_
 

Detailed Description

Helper class for translating between two times.

The time translator can be configured with a Real start time, a Translated start time, and a time scale.

It will convert a time from a series starting at realStartTime to a comparable time series instead starting at translatedStartTime. All durations in the time-sequence as scaled by 1/(timeScale).

That is, a time-sequence with time-scale 2 will finish twice as quickly.

Definition at line 55 of file time_translator.h.

Constructor & Destructor Documentation

◆ TimeTranslator()

rosbag::TimeTranslator::TimeTranslator ( )

Definition at line 39 of file time_translator.cpp.

Member Function Documentation

◆ setRealStartTime()

void rosbag::TimeTranslator::setRealStartTime ( ros::Time const &  t)

Definition at line 48 of file time_translator.cpp.

◆ setTimeScale()

void rosbag::TimeTranslator::setTimeScale ( double const &  s)

Definition at line 44 of file time_translator.cpp.

◆ setTranslatedStartTime()

void rosbag::TimeTranslator::setTranslatedStartTime ( ros::Time const &  t)

Increments the translated start time by shift. Useful for pausing.

Definition at line 52 of file time_translator.cpp.

◆ shift()

void rosbag::TimeTranslator::shift ( ros::Duration const &  d)

Increments the translated start time by shift. Useful for pausing.

Definition at line 56 of file time_translator.cpp.

◆ translate()

ros::Time rosbag::TimeTranslator::translate ( ros::Time const &  t)

Definition at line 60 of file time_translator.cpp.

Member Data Documentation

◆ real_start_

ros::Time rosbag::TimeTranslator::real_start_
private

Definition at line 68 of file time_translator.h.

◆ time_scale_

double rosbag::TimeTranslator::time_scale_
private

Definition at line 67 of file time_translator.h.

◆ translated_start_

ros::Time rosbag::TimeTranslator::translated_start_
private

Definition at line 69 of file time_translator.h.


The documentation for this class was generated from the following files:


rosbag
Author(s): Tim Field, Jeremy Leibs, James Bowman, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:34:21