Store state information of a physics::World object. More...
#include <physics/WorldState.hh>
Public Member Functions | |
WorldState () | |
Default constructor. | |
WorldState (WorldPtr _world) | |
Constructor. | |
virtual | ~WorldState () |
Destructor. | |
ModelState | GetModelState (unsigned int _index) const |
Get a model state. | |
ModelState | GetModelState (const std::string &_modelName) const |
Get a model state by model name. | |
unsigned int | GetModelStateCount () const |
Get the number of model states. | |
const sdf::ElementPtr & | GetSDF () const |
Get the state in SDF format. | |
virtual void | Load (sdf::ElementPtr _elem) |
Load state from SDF element. | |
Public Member Functions inherited from gazebo::physics::State | |
State () | |
Default constructor. | |
State (const std::string &_name, const common::Time &_realTime, const common::Time &_simTime) | |
Constructor. | |
virtual | ~State () |
Destructor. | |
std::string | GetName () const |
Get the name associated with this State. | |
common::Time | GetRealTime () const |
Get the real time when this state was generated. | |
common::Time | GetSimTime () const |
Get the sim time when this state was generated. | |
common::Time | GetWallTime () const |
Get the wall time when this state was generated. | |
Additional Inherited Members | |
Protected Attributes inherited from gazebo::physics::State | |
std::string | name |
Name associated with this State. | |
common::Time | realTime |
common::Time | simTime |
common::Time | wallTime |
Times for the state data. | |
Store state information of a physics::World object.
Instances of this class contain the state of a World at a specific time. World state includes the state of all models, and their children.
gazebo::physics::WorldState::WorldState | ( | ) |
Default constructor.
gazebo::physics::WorldState::WorldState | ( | WorldPtr | _world | ) |
|
virtual |
Destructor.
ModelState gazebo::physics::WorldState::GetModelState | ( | unsigned int | _index | ) | const |
Get a model state.
Get the state of a Model based on an index. The min index is and the max is WorldState::GetModelStateCount()
_index | Index of the model |
ModelState gazebo::physics::WorldState::GetModelState | ( | const std::string & | _modelName | ) | const |
Get a model state by model name.
unsigned int gazebo::physics::WorldState::GetModelStateCount | ( | ) | const |
Get the number of model states.
Returns the number of models in this instance.
const sdf::ElementPtr& gazebo::physics::WorldState::GetSDF | ( | ) | const |
Get the state in SDF format.
Returns a pointer to the SDF representation of the WorldState
|
virtual |
Load state from SDF element.
Set a WorldState from an SDF element containing WorldState info.
_elem | Pointer to the WorldState SDF element. |
Implements gazebo::physics::State.