keeps track of state of a physics::Joint More...
#include <physics/physics.hh>
Inherits State.
Public Member Functions | |
JointState () | |
Default constructor. More... | |
JointState (JointPtr _joint, const common::Time &_realTime, const common::Time &_simTime, const uint64_t _iterations) | |
Constructor. More... | |
JointState (JointPtr _joint) | |
Constructor. More... | |
JointState (const sdf::ElementPtr _sdf) | |
Constructor. More... | |
virtual | ~JointState () |
Destructor. More... | |
void | FillSDF (sdf::ElementPtr _sdf) |
Populate a state SDF element with data from the object. More... | |
math::Angle | GetAngle (unsigned int _axis) const |
Get the joint angle. More... | |
unsigned int | GetAngleCount () const |
Get the number of angles. More... | |
const std::vector< math::Angle > & | GetAngles () const |
Get the angles. More... | |
uint64_t | GetIterations () const |
Get the iterations when this state was generated. More... | |
std::string | GetName () const |
Get the name associated with this State. More... | |
common::Time | GetRealTime () const |
Get the real time when this state was generated. More... | |
common::Time | GetSimTime () const |
Get the sim time when this state was generated. More... | |
common::Time | GetWallTime () const |
Get the wall time when this state was generated. More... | |
bool | IsZero () const |
Return true if the values in the state are zero. More... | |
void | Load (JointPtr _joint, const common::Time &_realTime, const common::Time &_simTime) |
Load. More... | |
virtual void | Load (const sdf::ElementPtr _elem) |
Load state from SDF element. More... | |
JointState | operator+ (const JointState &_state) const |
Addition operator. More... | |
State | operator- (const State &_state) const |
Subtraction operator. More... | |
JointState | operator- (const JointState &_state) const |
Subtraction operator. More... | |
JointState & | operator= (const JointState &_state) |
Assignment operator. More... | |
virtual void | SetIterations (const uint64_t _iterations) |
Set the iterations when this state was generated. More... | |
void | SetName (const std::string &_name) |
Set the name associated with this State. More... | |
virtual void | SetRealTime (const common::Time &_time) |
Set the real time when this state was generated. More... | |
virtual void | SetSimTime (const common::Time &_time) |
Set the sim time when this state was generated. More... | |
virtual void | SetWallTime (const common::Time &_time) |
Set the wall time when this state was generated. More... | |
Protected Attributes | |
uint64_t | iterations |
The number of simulation iterations when this state was generated. More... | |
std::string | name |
Name associated with this State. More... | |
common::Time | realTime |
common::Time | simTime |
common::Time | wallTime |
Times for the state data. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::physics::JointState &_state) |
Stream insertion operator. More... | |
keeps track of state of a physics::Joint
JointState | ( | ) |
Default constructor.
JointState | ( | JointPtr | _joint, |
const common::Time & | _realTime, | ||
const common::Time & | _simTime, | ||
const uint64_t | _iterations | ||
) |
Constructor.
[in] | _joint | Joint to get the state of. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
[in] | _iterations | Simulation iterations. |
|
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.
void FillSDF | ( | sdf::ElementPtr | _sdf | ) |
Populate a state SDF element with data from the object.
[out] | _sdf | SDF element to populate. |
math::Angle GetAngle | ( | unsigned int | _axis | ) | const |
Get the joint angle.
[in] | _axis | The axis index. |
common::Exception | When _axis is invalid. |
unsigned int GetAngleCount | ( | ) | const |
Get the number of angles.
const std::vector<math::Angle>& GetAngles | ( | ) | const |
Get the angles.
|
inherited |
Get the iterations when this state was generated.
|
inherited |
|
inherited |
Get the real time when this state was generated.
|
inherited |
Get the sim time when this state was generated.
|
inherited |
Get the wall time when this state was generated.
bool IsZero | ( | ) | const |
Return true if the values in the state are zero.
void Load | ( | JointPtr | _joint, |
const common::Time & | _realTime, | ||
const common::Time & | _simTime | ||
) |
Load.
[in] | _joint | Joint to get the state of. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
|
virtual |
JointState operator+ | ( | const JointState & | _state | ) | const |
Addition operator.
[in] | _pt | A state to add. |
Subtraction operator.
[in] | _pt | A state to substract. |
JointState operator- | ( | const JointState & | _state | ) | const |
Subtraction operator.
[in] | _pt | A state to substract. |
JointState& operator= | ( | const JointState & | _state | ) |
|
virtualinherited |
Set the iterations when this state was generated.
[in] | _iterations | Iterations when the data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
inherited |
|
virtualinherited |
Set the real time when this state was generated.
[in] | _time | Clock time since simulation was stated. |
Reimplemented in ModelState, WorldState, and LinkState.
|
virtualinherited |
Set the sim time when this state was generated.
[in] | _time | Simulation time when the data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
virtualinherited |
Set the wall time when this state was generated.
[in] | _time | The absolute clock time when the State data was recorded. |
Reimplemented in ModelState, WorldState, and LinkState.
|
friend |
Stream insertion operator.
[in] | _out | output stream. |
[in] | _state | Joint state to output. |
|
protectedinherited |
The number of simulation iterations when this state was generated.
|
protectedinherited |
Name associated with this State.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Times for the state data.