Public Member Functions | Private Attributes
xpp::Joints Class Reference

Container to access joint values of each endeffectors. More...

#include <joints.h>

Inheritance diagram for xpp::Joints:
Inheritance graph
[legend]

List of all members.

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_

Detailed Description

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.

Definition at line 48 of file joints.h.


Constructor & Destructor Documentation

xpp::Joints::Joints ( int  n_ee,
int  n_joints_per_ee,
double  value = 0.0 
) [explicit]

Constructs joint values all set to value.

Parameters:
n_eetotal number of endeffectors.
n_joints_per_eenumber of joints for each endeffector.
valuesame 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.

Definition at line 35 of file joints.cc.

xpp::Joints::Joints ( const std::vector< VectorXd > &  joints) [explicit]

Converts a vector of leg joints into a Joint representation.

Parameters:
jointsJoint values of each endeffector

Attention: Each endeffector must have the same number of joints.

Definition at line 44 of file joints.cc.

virtual xpp::Joints::~Joints ( ) [virtual]

Member Function Documentation

double & xpp::Joints::GetJoint ( JointID  joint)
Returns:
read/write access of the joint value at index joint.

Definition at line 101 of file joints.cc.

double xpp::Joints::GetJoint ( JointID  joint) const
Returns:
read access of the joint value at index joint.

Definition at line 109 of file joints.cc.

Definition at line 52 of file joints.cc.

Definition at line 58 of file joints.cc.

void xpp::Joints::SetFromVec ( const VectorXd &  q)

Sets joints values from Eigen vector.

Parameters:
qThe Eigen Vector of joint values.

The vector q is interpreted as if the top n_joints_per_leg values rows belong to endeffector 0, the next n_joints_per_leg values to endeffector 1 and so on.

Definition at line 95 of file joints.cc.

void xpp::Joints::SetFromVec ( const VectorXd &  q,
const EEOrder &  ee_order 
)

Sets joint values from Eigen vector in specific order.

Parameters:
qThe Eigen Vector of joint values.
ee_orderDescribes the internal order of q.

Definition at line 78 of file joints.cc.

VectorXd xpp::Joints::ToVec ( ) const

Converts joint values to Eigen vector.

The endeffectors are starting from zero and for each endeffector the joints are appended in the order they where inserted.

Definition at line 89 of file joints.cc.

VectorXd xpp::Joints::ToVec ( const EEOrder &  ee_order) const

Converts joint values to Eigen vector according to specific order.

Parameters:
ee_orderThe order in which the endeffector's joints are appended.

Definition at line 64 of file joints.cc.


Member Data Documentation

int xpp::Joints::n_joints_ [private]

Definition at line 124 of file joints.h.

Definition at line 123 of file joints.h.


The documentation for this class was generated from the following files:


xpp_states
Author(s): Alexander W. Winkler
autogenerated on Fri Apr 5 2019 02:55:50