Store state information of a physics::Link object. More...
#include <physics/LinkState.hh>
Public Member Functions | |
LinkState () | |
Default constructor. | |
LinkState (const LinkPtr _link) | |
Constructor. | |
virtual | ~LinkState () |
Destructor. | |
void | FillStateSDF (sdf::ElementPtr _elem) |
Fill a State SDF element with state info. | |
math::Pose | GetAcceleration () const |
Get the link acceleration. | |
CollisionState | GetCollisionState (unsigned int _index) const |
Get a collision state. | |
CollisionState | GetCollisionState (const std::string &_collisionName) const |
Get a link state by link name. | |
unsigned int | GetCollisionStateCount () const |
Get the number of link states. | |
std::list< math::Pose > | GetForces () const |
Get the forces applied to the Link. | |
math::Pose | GetPose () const |
Get the link pose. | |
math::Pose | GetVelocity () const |
Get the link velocity. | |
virtual void | Load (sdf::ElementPtr _elem) |
Load state from SDF element. | |
void | UpdateLinkSDF (sdf::ElementPtr _elem) |
Update a Link 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::Link object.
This class captures the entire state of a Link at one specific time during a simulation run.
State of a Link includes the state of itself all its child Collision entities.
gazebo::physics::LinkState::LinkState | ( | ) |
Default constructor.
|
explicit |
|
virtual |
Destructor.
void gazebo::physics::LinkState::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. |
math::Pose gazebo::physics::LinkState::GetAcceleration | ( | ) | const |
Get the link acceleration.
CollisionState gazebo::physics::LinkState::GetCollisionState | ( | unsigned int | _index | ) | const |
Get a collision state.
Get a Collision State based on an index, where index is in the range of 0...LinkState::GetCollisionStateCount
[in] | _index | Index of the CollisionState |
CollisionState gazebo::physics::LinkState::GetCollisionState | ( | const std::string & | _collisionName | ) | const |
Get a link state by link name.
Searches through all CollisionStates. Returns the CollisionState with the matching name, if any.
[in] | _collisionName | Name of the CollisionState |
unsigned int gazebo::physics::LinkState::GetCollisionStateCount | ( | ) | const |
Get the number of link states.
This returns the number of Collisions recorded.
std::list<math::Pose> gazebo::physics::LinkState::GetForces | ( | ) | const |
Get the forces applied to the Link.
math::Pose gazebo::physics::LinkState::GetPose | ( | ) | const |
Get the link pose.
math::Pose gazebo::physics::LinkState::GetVelocity | ( | ) | const |
Get the link velocity.
|
virtual |
Load state from SDF element.
Load LinkState 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::LinkState::UpdateLinkSDF | ( | sdf::ElementPtr | _elem | ) |
Update a Link SDF element with this state info.
Set the values in a Links's SDF::Element with the information stored in this instance.
[in] | _elem | Pointer to a Links's SDF::Element |