All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
gazebo::physics::LinkState Class Reference

Store state information of a physics::Link object. More...

#include <physics/LinkState.hh>

Inheritance diagram for gazebo::physics::LinkState:
Inheritance graph
[legend]

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::PoseGetForces () 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

gazebo::physics::LinkState::LinkState ( )

Default constructor.

gazebo::physics::LinkState::LinkState ( const LinkPtr  _link)
explicit

Constructor.

Build a LinkState from an existing Link.

Parameters
[in]_modelPointer to the Link from which to gather state info.
virtual gazebo::physics::LinkState::~LinkState ( )
virtual

Destructor.

Member Function Documentation

void gazebo::physics::LinkState::FillStateSDF ( sdf::ElementPtr  _elem)

Fill a State SDF element with state info.

Stored state information into an SDF::Element pointer.

Parameters
[in]_elemPointer to the SDF::Element which recieves the data.
math::Pose gazebo::physics::LinkState::GetAcceleration ( ) const

Get the link acceleration.

Returns
The acceleration represented as a math::Pose
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

Parameters
[in]_indexIndex of the CollisionState
Returns
State of the Collision
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.

Parameters
[in]_collisionNameName of the CollisionState
Returns
State of the Collision.
unsigned int gazebo::physics::LinkState::GetCollisionStateCount ( ) const

Get the number of link states.

This returns the number of Collisions recorded.

Returns
Number of CollisionState recorded
std::list<math::Pose> gazebo::physics::LinkState::GetForces ( ) const

Get the forces applied to the Link.

Returns
The list of forces represented as a math::Pose
math::Pose gazebo::physics::LinkState::GetPose ( ) const

Get the link pose.

Returns
The math::Pose of the Link
math::Pose gazebo::physics::LinkState::GetVelocity ( ) const

Get the link velocity.

Returns
The velocity represented as a math::Pose
virtual void gazebo::physics::LinkState::Load ( sdf::ElementPtr  _elem)
virtual

Load state from SDF element.

Load LinkState information from stored data in and SDF::Element

Parameters
[in]_elemPointer 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.

Parameters
[in]_elemPointer to a Links's SDF::Element

The documentation for this class was generated from the following file: