Container to access joint values of each endeffectors. More...
#include <joints.h>
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. | |
Joints (const std::vector< VectorXd > &joints) | |
Converts a vector of leg joints into a Joint representation. | |
void | SetFromVec (const VectorXd &q) |
Sets joints values from Eigen vector. | |
void | SetFromVec (const VectorXd &q, const EEOrder &ee_order) |
Sets joint values from Eigen vector in specific order. | |
VectorXd | ToVec () const |
Converts joint values to Eigen vector. | |
VectorXd | ToVec (const EEOrder &ee_order) const |
Converts joint values to Eigen vector according to specific order. | |
virtual | ~Joints () |
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.
xpp::Joints::Joints | ( | int | n_ee, |
int | n_joints_per_ee, | ||
double | value = 0.0 |
||
) | [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.
xpp::Joints::Joints | ( | const std::vector< VectorXd > & | joints | ) | [explicit] |
virtual xpp::Joints::~Joints | ( | ) | [virtual] |
double & xpp::Joints::GetJoint | ( | JointID | joint | ) |
double xpp::Joints::GetJoint | ( | JointID | joint | ) | const |
int xpp::Joints::GetNumJoints | ( | ) | const |
int xpp::Joints::GetNumJointsPerEE | ( | ) | const |
void xpp::Joints::SetFromVec | ( | const VectorXd & | q | ) |
void xpp::Joints::SetFromVec | ( | const VectorXd & | q, |
const EEOrder & | ee_order | ||
) |
VectorXd xpp::Joints::ToVec | ( | ) | const |
VectorXd xpp::Joints::ToVec | ( | const EEOrder & | ee_order | ) | const |
int xpp::Joints::n_joints_ [private] |
int xpp::Joints::n_joints_per_leg_ [private] |