![]() |
RobWorkProject
23.9.11-
|
The configuration state of a work cell. More...
#include <QState.hpp>
Public Member Functions | |
| QState () | |
| Constructs an empty QState. | |
| QState (rw::core::Ptr< rw::kinematics::StateSetup > setup) | |
| A configuration state. More... | |
| virtual | ~QState () |
| destructor | |
| double * | getQ (const rw::kinematics::StateData &data) |
| An array of length frame.getDOF() containing the joint values for frame. More... | |
| const double * | getQ (const rw::kinematics::StateData &data) const |
| non const version of getQ. | |
| void | setQ (const rw::kinematics::StateData &data, const double *vals) |
| Assign for frame the frame.getDOF() joint values of the array vals. More... | |
| QState | operator* (double scale) const |
| Scaling of a configuration state by a scalar. | |
| QState | operator/ (double scale) const |
| Scaling of a configuration state by division. | |
| QState | operator+ (const QState &b) const |
| Addition of configuration states. | |
| QState | operator- (const QState &b) const |
| Subtraction of configuration states. | |
| QState | operator- () const |
| Unary minus operator. | |
| rw::core::Ptr< rw::kinematics::StateSetup > | getStateSetup () const |
| returns the StateSetup | |
| QState & | operator= (const QState &rhs) |
| Assignment operator. More... | |
| size_t | size () const |
| The dimension of the state vector. | |
| double & | operator() (size_t index) |
| Get element of state. More... | |
| const double & | operator() (size_t index) const |
| Get element of state. More... | |
| double & | operator[] (size_t index) |
| Get element of state. More... | |
| double | operator[] (size_t index) const |
| Get element of state. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const QState &state) |
| streaming operator More... | |
| QState | operator* (double scale, const QState &q) |
| Scaling of a configuration state by a scalar. | |
The configuration state of a work cell.
The configuration state contains state data values for all valid StateData in a StateStructure. The validity is defined by the StateSetup.
See Frame::getTransform() for the calculation of the relative transform of a frame for a given configuration state.
Configuration states can be freely copied and assigned.
The configuration state is a part of the StateStructure state (see State).
|
explicit |
A configuration state.
This constructor is not available for use outside of RobWork. Instead your configuration states should be constructed via the copy constructor.
| setup | [in] The shared setup for configuration states. |
| double* getQ | ( | const rw::kinematics::StateData & | data | ) |
An array of length frame.getDOF() containing the joint values for frame.
It is OK to call this method also for frames with zero degrees of freedom.
|
inline |
Get element of state.
| index | [in] the index. |
|
inline |
Get element of state.
| index | [in] the index. |
|
inline |
Get element of state.
| index | [in] the index. |
|
inline |
Get element of state.
| index | [in] the index. |
| void setQ | ( | const rw::kinematics::StateData & | data, |
| const double * | vals | ||
| ) |
Assign for frame the frame.getDOF() joint values of the array vals.
The array vals must be of length at least frame.getDOF().
| data | [in] The StateData for which the joint values are assigned. |
| vals | [in] The joint values to assign. |
setQ() and getQ() are related as follows:
|
friend |
streaming operator
| os | [in] output stream |
| state | [in] state to stream out |