Container to access joint values of each endeffectors. More...
#include <joints.h>
Public Types | |
using | Base = Endeffectors< VectorXd > |
using | EEOrder = std::vector< EndeffectorID > |
using | JointID = uint |
Public Types inherited from xpp::Endeffectors< VectorXd > | |
using | Container = std::deque< VectorXd > |
using | EndeffectorsT = Endeffectors< VectorXd > |
Public Member Functions | |
double & | GetJoint (JointID joint) |
double | GetJoint (JointID joint) const |
int | GetNumJoints () const |
int | GetNumJointsPerEE () const |
Joints (int n_ee, int n_joints_per_ee, double value=0.0) | |
Constructs joint values all set to value. More... | |
Joints (const std::vector< VectorXd > &joints) | |
Converts a vector of leg joints into a Joint representation. More... | |
void | SetFromVec (const VectorXd &q) |
Sets joints values from Eigen vector. More... | |
void | SetFromVec (const VectorXd &q, const EEOrder &ee_order) |
Sets joint values from Eigen vector in specific order. More... | |
VectorXd | ToVec () const |
Converts joint values to Eigen vector. More... | |
VectorXd | ToVec (const EEOrder &ee_order) const |
Converts joint values to Eigen vector according to specific order. More... | |
virtual | ~Joints ()=default |
Public Member Functions inherited from xpp::Endeffectors< VectorXd > | |
VectorXd & | at (EndeffectorID ee) |
Read/write access to the endeffector stored at index ee. More... | |
const VectorXd & | 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 VectorXd &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 | |
int | n_joints_ |
int | n_joints_per_leg_ |
Container to access joint values of each endeffectors.
The idea is that every joint affects only one specific endeffector, so the joints are grouped in this fashion. They can also be transformed to or set from an undiscriminative Eigen::VectorXd. This however is not recommended, as this Cartesian <->joint relationship is then lost/hidden.
using xpp::Joints::Base = Endeffectors<VectorXd> |
using xpp::Joints::EEOrder = std::vector<EndeffectorID> |
using xpp::Joints::JointID = uint |
|
explicit |
Constructs joint values all set to value.
n_ee | total number of endeffectors. |
n_joints_per_ee | number of joints for each endeffector. |
value | same joint value set for each joint. |
Constructing joints just from the number of joints is not permitted, as we enforce every joint to be assigned to an endeffector. This is restrictive, however it helps to avoid bugs and makes later computations easier.
|
explicit |
|
virtualdefault |
double & xpp::Joints::GetJoint | ( | JointID | joint | ) |
double xpp::Joints::GetJoint | ( | JointID | joint | ) | const |
void xpp::Joints::SetFromVec | ( | const VectorXd & | q | ) |
VectorXd xpp::Joints::ToVec | ( | ) | const |