All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::physics::Logplay Class Reference

Open and playback log files that were recorded using Logger. More...

#include <LogPlay.hh>

Public Member Functions

Iterator Begin ()
 Get an iterator to the beginning of the log file.
 
Iterator End ()
 Get an iterator to the end of the log file.
 
bool Open (const std::string &_logFile)
 Open a log file for reading.
 
bool Play (WorldPtr _world)
 Play a log file in a given World.
 
bool Play (WorldPtr _world, const std::string &_entityName)
 Play a log file in a given World using only data for a given entity.
 
bool Play (WorldPtr _world, const std::list< std::string > &_entityNames)
 Play a log file in a given World using only data for a list of entities.
 
bool Play (WorldPtr _world, common::Time _start, common::Time _stop)
 Play a segment of a log file in a given World.
 
bool Play (WorldPtr _world, const std::string &_entityName, common::Time _start, common::Time _stop)
 Play a segment of a log file in a given World using only data for a given entity.
 
bool Play (WorldPtr _world, const std::list< std::string > &_entityNames, common::Time _start, common::Time _stop)
 Play a segment of a log file in a given World using only data for a list of entities.
 

Detailed Description

Open and playback log files that were recorded using Logger.

Use Logplay to open a log file (Logplay::Open), and access the recorded state information. Iterators are available to step through the state information. It is also possible to replay the data in a World using the Play functions. Replay involves reading and applying state information to a World.

See Also
Logger, State

Member Function Documentation

Iterator gazebo::physics::Logplay::Begin ( )

Get an iterator to the beginning of the log file.

Requires a log file to be opened first. Use the iterator to step through a log file.

See Also
Logplay::Open.
Returns
Iterator the beginning of the opened log file
Iterator gazebo::physics::Logplay::End ( )

Get an iterator to the end of the log file.

Requires a log file to be opened first Use the iterator to step through a log file.

See Also
Logplay::Open.
Returns
Iterator the end of the opened log file
bool gazebo::physics::Logplay::Open ( const std::string &  _logFile)

Open a log file for reading.

Open a log file that was previously recorded.

Parameters
_logFileThe file to load
Returns
True if the log file was successfully loaded
bool gazebo::physics::Logplay::Play ( WorldPtr  _world)

Play a log file in a given World.

Replay a complete log file in a World. Requires a log file to be opened first,

See Also
Logplay::Open.
Parameters
_worldPointer to the World
Returns
True if replay was successful
bool gazebo::physics::Logplay::Play ( WorldPtr  _world,
const std::string &  _entityName 
)

Play a log file in a given World using only data for a given entity.

Replay a log file in a World, but only apply data for the given entity. Requires a log file to be opened first

See Also
Logplay::Open.
Parameters
_worldPointer to the World
_entityNameName of the entity to search the log for
Returns
True if replay was successful
bool gazebo::physics::Logplay::Play ( WorldPtr  _world,
const std::list< std::string > &  _entityNames 
)

Play a log file in a given World using only data for a list of entities.

Replay a log file in a World, but only apply data for the given list of entities. Requires a log file to be opened first,

See Also
Logplay::Open.
Parameters
_worldPointer to the World
_entityNamesNames of the entities to search the log for
Returns
True if replay was successful
bool gazebo::physics::Logplay::Play ( WorldPtr  _world,
common::Time  _start,
common::Time  _stop 
)

Play a segment of a log file in a given World.

Replay a segment of log file in a World. The segment is defined by a start and end time, where time is simulation time. Requires a log file to be opened first,

See Also
Logplay::Open.
Parameters
_worldPointer to the World.
_startStart time, in simulation time.
_stopStop time, in simulation time.
Returns
True if replay was successful.
bool gazebo::physics::Logplay::Play ( WorldPtr  _world,
const std::string &  _entityName,
common::Time  _start,
common::Time  _stop 
)

Play a segment of a log file in a given World using only data for a given entity.

Replay a segment of log file in a World, but only apply data for the given entity. The segment is defined by a start and end time, where time is simulation time. Requires a log file to be opened first,

See Also
Logplay::Open.
Parameters
_worldPointer to the World.
_entityNameName of the entity to search the log for
_startStart time, in simulation time.
_stopStop time, in simulation time.
Returns
True if replay was successful.
bool gazebo::physics::Logplay::Play ( WorldPtr  _world,
const std::list< std::string > &  _entityNames,
common::Time  _start,
common::Time  _stop 
)

Play a segment of a log file in a given World using only data for a list of entities.

Replay a segment of a log file in a World, but only apply data for the given list of entities. Requires a log file to be opened first,

See Also
Logplay::Open.
Parameters
_worldPointer to the World
_entityNamesNames of the entities to search the log for
_startStart time, in simulation time.
_stopStop time, in simulation time.
Returns
True if replay was successful

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