Store state information of a physics::Model object. More...
#include <physics/physics.hh>

Public Member Functions | |
| ModelState () | |
| Default constructor. | |
| ModelState (ModelPtr _model) | |
| Constructor. | |
| virtual | ~ModelState () |
| Destructor. | |
| void | FillStateSDF (sdf::ElementPtr _elem) |
| Fill a State SDF element with state info. | |
| JointState | GetJointState (unsigned int _index) const |
| Get a Joint state. | |
| JointState | GetJointState (const std::string &_jointName) const |
| Get a Joint state by Joint name. | |
| unsigned int | GetJointStateCount () const |
| Get the number of joint states. | |
| LinkState | GetLinkState (unsigned int _index) const |
| Get a link state. | |
| LinkState | GetLinkState (const std::string &_linkName) const |
| Get a link state by Link name. | |
| unsigned int | GetLinkStateCount () const |
| Get the number of link states. | |
| math::Pose | GetPose () const |
| Get the stored model pose. | |
| virtual void | Load (sdf::ElementPtr _elem) |
| Load state from SDF element. | |
| void | UpdateModelSDF (sdf::ElementPtr _elem) |
| Update a Model SDF element with this state info. | |
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::Model object.
This class captures the entire state of a Model at one specific time during a simulation run.
State of a Model includes the state of all its child Links and Joints.
| gazebo::physics::ModelState::ModelState | ( | ) |
Default constructor.
|
explicit |
Constructor.
Build a ModelState from an existing Model.
| [in] | _model | Pointer to the model from which to gather state info. |
|
virtual |
Destructor.
| void gazebo::physics::ModelState::FillStateSDF | ( | sdf::ElementPtr | _elem | ) |
Fill a State SDF element with state info.
Stored state information into an SDF::Element pointer.
| [in] | _elem | Pointer to the SDF::Element which recieves the data. |
| JointState gazebo::physics::ModelState::GetJointState | ( | unsigned int | _index | ) | const |
Get a Joint state.
Return a JointState based on a index, where index is between 0...ModelState::GetJointStateCount().
| [in] | _index | Index of a JointState. |
| JointState gazebo::physics::ModelState::GetJointState | ( | const std::string & | _jointName | ) | const |
Get a Joint state by Joint name.
Searches through all JointStates. Returns the JointState with the matching name, if any.
| [in] | _jointName | Name of the JointState. |
| unsigned int gazebo::physics::ModelState::GetJointStateCount | ( | ) | const |
Get the number of joint states.
Returns the number of JointStates recorded.
| LinkState gazebo::physics::ModelState::GetLinkState | ( | unsigned int | _index | ) | const |
| LinkState gazebo::physics::ModelState::GetLinkState | ( | const std::string & | _linkName | ) | const |
| unsigned int gazebo::physics::ModelState::GetLinkStateCount | ( | ) | const |
Get the number of link states.
This returns the number of Links recorded.
| math::Pose gazebo::physics::ModelState::GetPose | ( | ) | const |
Get the stored model pose.
|
virtual |
Load state from SDF element.
Load ModelState information from stored data in and SDF::Element
| [in] | _elem | Pointer to the SDF::Element containing state info. |
Implements gazebo::physics::State.
| void gazebo::physics::ModelState::UpdateModelSDF | ( | sdf::ElementPtr | _elem | ) |