Store state information of a physics::Link object.
More...
#include <physics/physics.hh>
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 |
( |
| ) |
|
gazebo::physics::LinkState::LinkState |
( |
const LinkPtr |
_link | ) |
|
|
explicit |
Constructor.
Build a LinkState from an existing Link.
- Parameters
-
[in] | _model | Pointer to the Link from which to gather state info. |
Constructor.
Build a LinkState from SDF data
- Parameters
-
[in] | _sdf | SDF data to load a link state from. |
virtual gazebo::physics::LinkState::~LinkState |
( |
| ) |
|
|
virtual |
Populate a state SDF element with data from the object.
- Parameters
-
[out] | _sdf | SDF element to populate. |
const 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 |
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
-
- Returns
- State of the Collision.
- Exceptions
-
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.
const std::vector<CollisionState>& gazebo::physics::LinkState::GetCollisionStates |
( |
| ) |
const |
Get the collision states.
- Returns
- A vector of collision states.
const math::Pose& gazebo::physics::LinkState::GetPose |
( |
| ) |
const |
const math::Pose& gazebo::physics::LinkState::GetVelocity |
( |
| ) |
const |
Get the link velocity.
- Returns
- The velocity represented as a math::Pose.
const math::Pose& gazebo::physics::LinkState::GetWrench |
( |
| ) |
const |
Get the force applied to the Link.
- Returns
- Magnitude of the force.
bool gazebo::physics::LinkState::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::LinkState::Load |
( |
const sdf::ElementPtr |
_elem | ) |
|
|
virtual |
Load state from SDF element.
Load LinkState 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
-
- 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 | Link state to output |
- Returns
- the stream
The documentation for this class was generated from the following file: