Store state information of a physics::Model object.  
 More...
#include <physics/physics.hh>
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 | ( |  | ) |  | 
      
 
 
  
  | 
        
          | gazebo::physics::ModelState::ModelState | ( | const ModelPtr | _model | ) |  |  | explicit | 
 
Constructor. 
Build a ModelState from an existing Model. 
- Parameters
- 
  
    | [in] | _model | Pointer to the model from which to gather state info. |  
 
 
 
Constructor. 
Build a ModelState from SDF data 
- Parameters
- 
  
    | [in] | _sdf | SDF data to load a model state from. |  
 
 
 
  
  | 
        
          | virtual gazebo::physics::ModelState::~ModelState | ( |  | ) |  |  | virtual | 
 
 
      
        
          | JointState gazebo::physics::ModelState::GetJointState | ( | unsigned int | _index | ) | const | 
      
 
 
      
        
          | 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. 
- Parameters
- 
  
  
- Returns
- State of the Joint. 
- Exceptions
- 
  
  
 
 
      
        
          | unsigned int gazebo::physics::ModelState::GetJointStateCount | ( |  | ) | const | 
      
 
Get the number of joint states. 
Returns the number of JointStates recorded. 
- Returns
- Number of JointStates. 
 
 
      
        
          | const std::vector<JointState>& gazebo::physics::ModelState::GetJointStates | ( |  | ) | const | 
      
 
Get the joint states. 
- Returns
- A vector of joint states. 
 
 
      
        
          | LinkState gazebo::physics::ModelState::GetLinkState | ( | unsigned int | _index | ) | const | 
      
 
 
      
        
          | LinkState gazebo::physics::ModelState::GetLinkState | ( | const std::string & | _linkName | ) | const | 
      
 
Get a link state by Link name. 
Searches through all LinkStates. Returns the LinkState with the matching name, if any. 
- Parameters
- 
  
  
- Returns
- State of the Link. 
- Exceptions
- 
  
  
 
 
      
        
          | unsigned int gazebo::physics::ModelState::GetLinkStateCount | ( |  | ) | const | 
      
 
Get the number of link states. 
This returns the number of Links recorded. 
- Returns
- Number of LinkState recorded. 
 
 
      
        
          | const std::vector<LinkState>& gazebo::physics::ModelState::GetLinkStates | ( |  | ) | const | 
      
 
Get the link states. 
- Returns
- A vector of link states. 
 
 
      
        
          | const math::Pose& gazebo::physics::ModelState::GetPose | ( |  | ) | const | 
      
 
 
      
        
          | bool gazebo::physics::ModelState::IsZero | ( |  | ) | const | 
      
 
Return true if the values in the state are zero. 
- Returns
- True if the values in the state are zero. 
 
 
  
  | 
        
          | virtual void gazebo::physics::ModelState::Load | ( | const sdf::ElementPtr | _elem | ) |  |  | virtual | 
 
Load state from SDF element. 
Load ModelState information from stored data in and SDF::Element 
- Parameters
- 
  
    | [in] | _elem | Pointer to the SDF::Element containing state info. |  
 
Reimplemented from gazebo::physics::State.
 
 
Addition operator. 
- Parameters
- 
  
    | [in] | _pt | A state to substract. |  
 
- Returns
- The resulting state. 
 
 
Subtraction operator. 
- Parameters
- 
  
    | [in] | _pt | A state to substract. |  
 
- Returns
- The resulting state. 
 
 
Assignment operator. 
- Parameters
- 
  
  
- Returns
- this 
 
 
Stream insertion operator. 
- Parameters
- 
  
    | [in] | _out | output stream. |  | [in] | _state | Model state to output. |  
 
- Returns
- The stream. 
 
 
The documentation for this class was generated from the following file: