Store state information of a physics::World object.
More...
#include <physics/physics.hh>
Detailed Description
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.
Constructor & Destructor Documentation
gazebo::physics::WorldState::WorldState |
( |
| ) |
|
gazebo::physics::WorldState::WorldState |
( |
const WorldPtr |
_world | ) |
|
|
explicit |
Constructor.
Generate a WorldState from an instance of a World.
- Parameters
-
[in] | _world | Pointer to a world |
Constructor.
Build a WorldState from SDF data
- Parameters
-
[in] | _sdf | SDF data to load a world state from. |
virtual gazebo::physics::WorldState::~WorldState |
( |
| ) |
|
|
virtual |
Member Function Documentation
Populate a state SDF element with data from the object.
- Parameters
-
[out] | _sdf | SDF element to populate. |
ModelState gazebo::physics::WorldState::GetModelState |
( |
unsigned int |
_index | ) |
const |
ModelState gazebo::physics::WorldState::GetModelState |
( |
const std::string & |
_modelName | ) |
const |
Get a model state by model name.
- Parameters
-
[in] | _modelName | Name of the model state to get. |
- Returns
- The model state.
- Exceptions
-
unsigned int gazebo::physics::WorldState::GetModelStateCount |
( |
| ) |
const |
Get the number of model states.
Returns the number of models in this instance.
- Returns
- Number of models.
ModelState_M gazebo::physics::WorldState::GetModelStates |
( |
const boost::regex & |
_regex | ) |
const |
Get model states based on a regular expression.
- Parameters
-
[in] | _regex | The regular expression. |
- Returns
- List of model states whose names match the regular expression.
const ModelState_M& gazebo::physics::WorldState::GetModelStates |
( |
| ) |
const |
Get the model states.
- Returns
- A vector of model states.
bool gazebo::physics::WorldState::HasModelState |
( |
const std::string & |
_modelName | ) |
const |
Return true if WorldState has a ModelState with the given name.
- Parameters
-
[in] | _modelName | Name of the model to search for. |
- Returns
- True if the ModelState exists.
bool gazebo::physics::WorldState::IsZero |
( |
| ) |
const |
Return true if the values in the state are zero.
This will check to see if the all model states are zero.
- Returns
- True if the values in the state are zero.
void gazebo::physics::WorldState::Load |
( |
const WorldPtr |
_world | ) |
|
Load from a World pointer.
Generate a WorldState from an instance of a World.
- Parameters
-
[in] | _world | Pointer to a world |
virtual void gazebo::physics::WorldState::Load |
( |
const sdf::ElementPtr |
_elem | ) |
|
|
virtual |
Addition operator.
- Parameters
-
- Returns
- The resulting state.
Subtraction operator.
- Parameters
-
[in] | _pt | A state to substract. |
- Returns
- The resulting state.
Assignment operator.
- Parameters
-
- Returns
- Reference to this
virtual void gazebo::physics::WorldState::SetRealTime |
( |
const common::Time & |
_time | ) |
|
|
virtual |
Set the real time when this state was generated.
- Parameters
-
[in] | _time | Clock time since simulation was stated. |
Reimplemented from gazebo::physics::State.
virtual void gazebo::physics::WorldState::SetSimTime |
( |
const common::Time & |
_time | ) |
|
|
virtual |
Set the sim time when this state was generated.
- Parameters
-
[in] | _time | Simulation time when the data was recorded. |
Reimplemented from gazebo::physics::State.
virtual void gazebo::physics::WorldState::SetWallTime |
( |
const common::Time & |
_time | ) |
|
|
virtual |
Set the wall time when this state was generated.
- Parameters
-
[in] | _time | The absolute clock time when the State data was recorded. |
Reimplemented from gazebo::physics::State.
void gazebo::physics::WorldState::SetWorld |
( |
const WorldPtr |
_world | ) |
|
Set the world.
- Parameters
-
[in] | _world | Pointer to the world. |
Friends And Related Function Documentation
Stream insertion operator.
- Parameters
-
[in] | _out | output stream |
[in] | _state | World state to output |
- Returns
- the stream
The documentation for this class was generated from the following file: