keeps track of state of a physics::Joint
More...
#include <physics/physics.hh>
Inherits State.
keeps track of state of a physics::Joint
◆ JointState() [1/4]
◆ JointState() [2/4]
Constructor.
- Parameters
-
[in] | _joint | Joint to get the state of. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
[in] | _iterations | Simulation iterations. |
◆ JointState() [3/4]
Constructor.
- Parameters
-
[in] | _joint | Joint to get the state of. |
◆ JointState() [4/4]
Constructor.
Build a JointState from SDF data
- Parameters
-
[in] | _sdf | SDF data to load a joint state from. |
◆ ~JointState()
◆ FillSDF()
void FillSDF |
( |
sdf::ElementPtr | _sdf | ) |
|
Populate a state SDF element with data from the object.
- Parameters
-
[out] | _sdf | SDF element to populate. |
◆ GetAngleCount()
unsigned int GetAngleCount |
( |
| ) |
const |
Get the number of angles.
- Returns
- The number of angles.
◆ GetIterations()
uint64_t GetIterations |
( |
| ) |
const |
|
inherited |
Get the iterations when this state was generated.
- Returns
- Iterations when the data was recorded
◆ GetName()
std::string GetName |
( |
| ) |
const |
|
inherited |
Get the name associated with this State.
- Returns
- Name associated with this state information. Typically a name of an Entity.
◆ GetRealTime()
Get the real time when this state was generated.
- Returns
- Clock time since simulation was stated.
◆ GetSimTime()
Get the sim time when this state was generated.
- Returns
- Simulation time when the data was recorded.
◆ GetWallTime()
Get the wall time when this state was generated.
- Returns
- The absolute clock time when the State data was recorded.
◆ IsZero()
Return true if the values in the state are zero.
- Returns
- True if the values in the state are zero.
◆ Load() [1/2]
virtual void Load |
( |
const sdf::ElementPtr | _elem | ) |
|
|
virtual |
Load state from SDF element.
- Parameters
-
[in] | _elem | SDf values to load from. |
Reimplemented from State.
◆ Load() [2/2]
Load.
- Parameters
-
[in] | _joint | Joint to get the state of. |
[in] | _realTime | Real time stamp. |
[in] | _simTime | Sim time stamp. |
◆ operator+()
Addition operator.
- Parameters
-
- Returns
- The resulting state.
◆ operator-() [1/2]
Subtraction operator.
- Parameters
-
[in] | _pt | A state to substract. |
- Returns
- The resulting state.
◆ operator-() [2/2]
Subtraction operator.
- Parameters
-
[in] | _pt | A state to substract. |
- Returns
- The resulting state.
◆ operator=()
Assignment operator.
- Parameters
-
- Returns
- this
◆ Position()
double Position |
( |
const unsigned int | _axis = 0 | ) |
const |
Get the joint position.
For rotational axes, the value is in radians. For prismatic axes, it is in meters.
It returns ignition::math::NAN_D in case the position can't be obtained. For instance, if the index is invalid.
- Parameters
-
[in] | _index | Index of the axis, defaults to 0. |
- Returns
- Position of the axis.
◆ Positions()
const std::vector< double > & Positions |
( |
| ) |
const |
Get the joint positions.
For rotational axes, the value is in radians. For prismatic axes, it is in meters.
- Returns
- Vector of joint positions.
◆ SetIterations()
virtual void SetIterations |
( |
const uint64_t | _iterations | ) |
|
|
virtualinherited |
Set the iterations when this state was generated.
- Parameters
-
[in] | _iterations | Iterations when the data was recorded. |
Reimplemented in LinkState, ModelState, and WorldState.
◆ SetName()
void SetName |
( |
const std::string & | _name | ) |
|
|
inherited |
Set the name associated with this State.
- Parameters
-
[in] | _name | Name associated with this state information. Typically the name of an Entity. |
◆ SetRealTime()
Set the real time when this state was generated.
- Parameters
-
[in] | _time | Clock time since simulation was stated. |
Reimplemented in LinkState, ModelState, and WorldState.
◆ SetSimTime()
Set the sim time when this state was generated.
- Parameters
-
[in] | _time | Simulation time when the data was recorded. |
Reimplemented in LinkState, ModelState, and WorldState.
◆ SetWallTime()
Set the wall time when this state was generated.
- Parameters
-
[in] | _time | The absolute clock time when the State data was recorded. |
Reimplemented in LinkState, ModelState, and WorldState.
◆ iterations
The number of simulation iterations when this state was generated.
◆ name
Name associated with this State.
◆ realTime
◆ simTime
◆ wallTime
Times for the state data.
The documentation for this class was generated from the following file: