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

keeps track of state of a physics::Joint More...

#include <physics/physics.hh>

Inheritance diagram for gazebo::physics::JointState:
Inheritance graph
[legend]
Collaboration diagram for gazebo::physics::JointState:
Collaboration graph
[legend]

Public Member Functions

 JointState ()
 Default constructor. More...
 
 JointState (JointPtr _joint, const common::Time &_realTime, const common::Time &_simTime)
 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...
 
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...
 
JointState operator- (const JointState &_state) const
 Subtraction operator. More...
 
JointStateoperator= (const JointState &_state)
 Assignment operator. More...
 
- Public Member Functions inherited from gazebo::physics::State
 State ()
 Default constructor. More...
 
 State (const std::string &_name, const common::Time &_realTime, const common::Time &_simTime)
 Constructor. More...
 
virtual ~State ()
 Destructor. 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...
 
State operator- (const State &_state) const
 Subtraction operator. More...
 
Stateoperator= (const State &_state)
 Assignment operator. 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...
 

Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::physics::JointState &_state)
 Stream insertion operator. More...
 

Additional Inherited Members

- Protected Attributes inherited from gazebo::physics::State
std::string name
 Name associated with this State. More...
 
common::Time realTime
 
common::Time simTime
 
common::Time wallTime
 Times for the state data. More...
 

Detailed Description

keeps track of state of a physics::Joint

Constructor & Destructor Documentation

gazebo::physics::JointState::JointState ( )

Default constructor.

gazebo::physics::JointState::JointState ( JointPtr  _joint,
const common::Time _realTime,
const common::Time _simTime 
)

Constructor.

Parameters
[in]_jointJoint to get the state of.
[in]_realTimeReal time stamp.
[in]_simTimeSim time stamp.
gazebo::physics::JointState::JointState ( JointPtr  _joint)
explicit

Constructor.

Parameters
[in]_jointJoint to get the state of.
gazebo::physics::JointState::JointState ( const sdf::ElementPtr  _sdf)
explicit

Constructor.

Build a JointState from SDF data

Parameters
[in]_sdfSDF data to load a joint state from.
virtual gazebo::physics::JointState::~JointState ( )
virtual

Destructor.

Member Function Documentation

void gazebo::physics::JointState::FillSDF ( sdf::ElementPtr  _sdf)

Populate a state SDF element with data from the object.

Parameters
[out]_sdfSDF element to populate.
math::Angle gazebo::physics::JointState::GetAngle ( unsigned int  _axis) const

Get the joint angle.

Parameters
[in]_axisThe axis index.
Returns
Angle of the axis.
Exceptions
common::ExceptionWhen _axis is invalid.
unsigned int gazebo::physics::JointState::GetAngleCount ( ) const

Get the number of angles.

Returns
The number of angles.
const std::vector<math::Angle>& gazebo::physics::JointState::GetAngles ( ) const

Get the angles.

Returns
Vector of angles.
bool gazebo::physics::JointState::IsZero ( ) const

Return true if the values in the state are zero.

Returns
True if the values in the state are zero.
void gazebo::physics::JointState::Load ( JointPtr  _joint,
const common::Time _realTime,
const common::Time _simTime 
)

Load.

Parameters
[in]_jointJoint to get the state of.
[in]_realTimeReal time stamp.
[in]_simTimeSim time stamp.
virtual void gazebo::physics::JointState::Load ( const sdf::ElementPtr  _elem)
virtual

Load state from SDF element.

Parameters
[in]_elemSDf values to load from.

Reimplemented from gazebo::physics::State.

JointState gazebo::physics::JointState::operator+ ( const JointState _state) const

Addition operator.

Parameters
[in]_ptA state to add.
Returns
The resulting state.
JointState gazebo::physics::JointState::operator- ( const JointState _state) const

Subtraction operator.

Parameters
[in]_ptA state to substract.
Returns
The resulting state.
JointState& gazebo::physics::JointState::operator= ( const JointState _state)

Assignment operator.

Parameters
[in]_stateState value
Returns
this

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::physics::JointState _state 
)
friend

Stream insertion operator.

Parameters
[in]_outoutput stream.
[in]_stateJoint state to output.
Returns
The stream.

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