Data structure to assign values to each endeffector. More...
#include <endeffectors.h>
Public Types | |
using | Container = std::deque< T > |
using | EndeffectorsT = Endeffectors< T > |
Public Member Functions | |
T & | at (EndeffectorID ee) |
Read/write access to the endeffector stored at index ee. More... | |
const T & | at (EndeffectorID ee) const |
Read access to the endeffector stored at index ee. More... | |
Endeffectors (int n_ee=0) | |
int | GetEECount () const |
std::vector< EndeffectorID > | GetEEsOrdered () const |
bool | operator!= (const Endeffectors &other) const |
const EndeffectorsT | operator- (const EndeffectorsT &rhs) const |
const EndeffectorsT | operator/ (double scalar) const |
void | SetAll (const T &value) |
Sets each endeffector to the same value. More... | |
void | SetCount (int n_ee) |
Sets the number of endeffectors. More... | |
Container | ToImpl () const |
virtual | ~Endeffectors ()=default |
Private Attributes | |
Container | ee_ |
Data structure to assign values to each endeffector.
Common values are xyz-positions (Vector3d), contact-flags (bool), or joints angles of each leg.
This gives a unified interface, and also holds for boolean values (which is not possible using an std::vector). It allows to restrict default constructors, define addition and subtraction of all endeffectors and other convenience functions associated specifically to endeffectors.
The idea is that this class is an enhanced STL container, but complies to the same interface, (e.g at()). However, in case this unified interface is burdensome, you can always access the underlying STL-deque container directly.
Definition at line 86 of file endeffectors.h.
using xpp::Endeffectors< T >::Container = std::deque<T> |
Definition at line 88 of file endeffectors.h.
using xpp::Endeffectors< T >::EndeffectorsT = Endeffectors<T> |
Definition at line 89 of file endeffectors.h.
xpp::Endeffectors< T >::Endeffectors | ( | int | n_ee = 0 | ) |
Definition at line 203 of file endeffectors.h.
|
virtualdefault |
T & xpp::Endeffectors< T >::at | ( | EndeffectorID | ee | ) |
Read/write access to the endeffector stored at index ee.
ee | Endeffector index/position. |
Definition at line 224 of file endeffectors.h.
const T & xpp::Endeffectors< T >::at | ( | EndeffectorID | ee | ) | const |
Read access to the endeffector stored at index ee.
ee | Endeffector index/position. |
Definition at line 231 of file endeffectors.h.
int xpp::Endeffectors< T >::GetEECount |
Definition at line 238 of file endeffectors.h.
std::vector< EndeffectorID > xpp::Endeffectors< T >::GetEEsOrdered |
Definition at line 252 of file endeffectors.h.
bool xpp::Endeffectors< T >::operator!= | ( | const Endeffectors< T > & | other | ) | const |
Definition at line 294 of file endeffectors.h.
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator- | ( | const EndeffectorsT & | rhs | ) | const |
Definition at line 263 of file endeffectors.h.
const Endeffectors< T >::EndeffectorsT xpp::Endeffectors< T >::operator/ | ( | double | scalar | ) | const |
Definition at line 274 of file endeffectors.h.
void xpp::Endeffectors< T >::SetAll | ( | const T & | value | ) |
Sets each endeffector to the same value.
Definition at line 217 of file endeffectors.h.
void xpp::Endeffectors< T >::SetCount | ( | int | n_ee | ) |
Sets the number of endeffectors.
Definition at line 210 of file endeffectors.h.
Endeffectors< T >::Container xpp::Endeffectors< T >::ToImpl |
Definition at line 245 of file endeffectors.h.
|
private |
Definition at line 140 of file endeffectors.h.