Gazebo Sim

API Reference

8.6.0
PlaybackScrubber Class Reference

Provides slider and functionality for log playback. to the scene. More...

#include <PlaybackScrubber.hh>

Public Slots

QString CurrentTimeAsString ()
 Get the current time of the log playback. More...
 
QString EndTimeAsString ()
 Get the end time of the log playback. More...
 
void OnDrop (double _value)
 Callback in Qt thread when the slider is released. More...
 
void OnTimeEntered (const QString &_time)
 Callback when a time is entered by the user. More...
 
double Progress ()
 Get the current progress as a percentage of how far the log playback has advanced. More...
 
QString StartTimeAsString ()
 Get the starting time of the log playback. More...
 

Signals

void newProgress ()
 Notify that progress has advanced in the log file. More...
 

Public Member Functions

 PlaybackScrubber ()
 Constructor. More...
 
 ~PlaybackScrubber () override
 Destructor. More...
 
double CalculateProgress ()
 Calculate the percentage that _currentTime, eg, halfway through the log would evaluate to 0.50. More...
 
void LoadConfig (const tinyxml2::XMLElement *_pluginElem) override
 
void Update (const UpdateInfo &, EntityComponentManager &) override
 Update callback called every time the system is stepped. This is called at a Gazebo Transport thread, so any interaction with Qt should be done through signals and slots. More...
 
- Public Member Functions inherited from Plugin
 Plugin ()
 
virtual ~Plugin ()
 
QQuickItem * CardItem () const
 
virtual std::string ConfigStr ()
 
QQmlContext * Context () const
 
bool DeleteLaterRequested () const
 
void Load (const tinyxml2::XMLElement *_pluginElem)
 
QQuickItem * PluginItem () const
 
void PostParentChanges ()
 
virtual std::string Title () const
 

Additional Inherited Members

- Protected Member Functions inherited from Plugin
void DeleteLater ()
 
- Protected Attributes inherited from Plugin
std::string configStr
 
std::string title
 

Detailed Description

Provides slider and functionality for log playback. to the scene.

Constructor & Destructor Documentation

◆ PlaybackScrubber()

Constructor.

◆ ~PlaybackScrubber()

~PlaybackScrubber ( )
override

Destructor.

Member Function Documentation

◆ CalculateProgress()

double CalculateProgress ( )

Calculate the percentage that _currentTime, eg, halfway through the log would evaluate to 0.50.

Returns
The progress as a percentage of how far the log playback has advanced

◆ CurrentTimeAsString

QString CurrentTimeAsString ( )
slot

Get the current time of the log playback.

Returns
The current time in format dd hh:mm:ss.nnn as a QString.

◆ EndTimeAsString

QString EndTimeAsString ( )
slot

Get the end time of the log playback.

Returns
The end time in format dd hh:mm:ss.nnn as a QString.

◆ LoadConfig()

void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
overridevirtual

Reimplemented from Plugin.

◆ newProgress

void newProgress ( )
signal

Notify that progress has advanced in the log file.

◆ OnDrop

void OnDrop ( double  _value)
slot

Callback in Qt thread when the slider is released.

Parameters
[in]_valueThe current value of the slider, from 0 to 1, inclusive

◆ OnTimeEntered

void OnTimeEntered ( const QString &  _time)
slot

Callback when a time is entered by the user.

Parameters
[in]_timeThe time in format dd hh:mm:ss.nnn

◆ Progress

double Progress ( )
slot

Get the current progress as a percentage of how far the log playback has advanced.

Returns
The progress as a value from 0 to 1, inclusive

◆ StartTimeAsString

QString StartTimeAsString ( )
slot

Get the starting time of the log playback.

Returns
The start time in format dd hh:mm:ss.nnn as a QString.

◆ Update()

void Update ( const UpdateInfo _info,
EntityComponentManager _ecm 
)
overridevirtual

Update callback called every time the system is stepped. This is called at a Gazebo Transport thread, so any interaction with Qt should be done through signals and slots.

Parameters
[in]_infoCurrent simulation information, such as time.
[in]_ecmMutable reference to the ECM, so the system can read and write entities and their components.

Reimplemented from GuiSystem.


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