keeps track of state of a physics::Joint More...
#include <physics/physics.hh>
Public Member Functions | |
JointState () | |
Default constructor. | |
JointState (JointPtr _joint) | |
Constructor. | |
JointState (const sdf::ElementPtr _sdf) | |
Constructor. | |
virtual | ~JointState () |
Destructor. | |
math::Angle | GetAngle (unsigned int _axis) const |
Get the joint angle. | |
unsigned int | GetAngleCount () const |
Get the number of angles. | |
const std::vector< math::Angle > & | GetAngles () const |
Get the angles. | |
bool | IsZero () const |
Return true if the values in the state are zero. | |
virtual void | Load (const sdf::ElementPtr _elem) |
Load state from SDF element. | |
JointState | operator+ (const JointState &_state) const |
Addition operator. | |
JointState | operator- (const JointState &_state) const |
Subtraction operator. | |
JointState & | operator= (const JointState &_state) |
Assignment operator. | |
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. | |
State | operator- (const State &_state) const |
Subtraction operator. | |
State & | operator= (const State &_state) |
Assignment operator. | |
void | SetName (const std::string &_name) |
Set the name associated with this State. | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::physics::JointState &_state) |
Stream insertion operator. | |
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. | |
keeps track of state of a physics::Joint
gazebo::physics::JointState::JointState | ( | ) |
Default constructor.
|
explicit |
Constructor.
[in] | _joint | Joint to get the state of. |
|
explicit |
Constructor.
Build a JointState from SDF data
[in] | _sdf | SDF data to load a joint state from. |
|
virtual |
Destructor.
math::Angle gazebo::physics::JointState::GetAngle | ( | unsigned int | _axis | ) | const |
Get the joint angle.
[in] | _axis | The axis index. |
common::Exception | When _axis is invalid. |
unsigned int gazebo::physics::JointState::GetAngleCount | ( | ) | const |
Get the number of angles.
const std::vector<math::Angle>& gazebo::physics::JointState::GetAngles | ( | ) | const |
Get the angles.
bool gazebo::physics::JointState::IsZero | ( | ) | const |
Return true if the values in the state are zero.
|
virtual |
Load state from SDF element.
[in] | _elem | SDf values to load from. |
Reimplemented from gazebo::physics::State.
JointState gazebo::physics::JointState::operator+ | ( | const JointState & | _state | ) | const |
Addition operator.
[in] | _pt | A state to add. |
JointState gazebo::physics::JointState::operator- | ( | const JointState & | _state | ) | const |
Subtraction operator.
[in] | _pt | A state to substract. |
JointState& gazebo::physics::JointState::operator= | ( | const JointState & | _state | ) |
|
friend |
Stream insertion operator.
[in] | _out | output stream. |
[in] | _state | Joint state to output. |