Kinematics Animation Multithread
Classes | Public Member Functions | Private Attributes | List of all members
AnimatedHand Class Reference

#include <animated_hand.h>

Classes

struct  HandMap
 

Public Member Functions

 AnimatedHand ()
 
std::vector< Eigen::Vector3d > get_hand_angles (const std::vector< double > &joint_angles)
 

Private Attributes

std::vector< HandMapm_hand_map
 
int m_hand_frames_num = 9
 
std::vector< int > m_hand_idx_iter = {3, 4, 5, 6, 7, 8, 0, 1, 2}
 

Detailed Description

Definition at line 9 of file animated_hand.h.

Constructor & Destructor Documentation

◆ AnimatedHand()

AnimatedHand::AnimatedHand ( )
inline

Definition at line 13 of file animated_hand.h.

13{};

Member Function Documentation

◆ get_hand_angles()

std::vector< Eigen::Vector3d > AnimatedHand::get_hand_angles ( const std::vector< double > &  joint_angles)

Definition at line 4 of file animated_hand.cpp.

6{
7 // Initialize euler container
8 std::vector<Eigen::Vector3d> euler_vec;
9
10 // Zero all euler angles
11 for (size_t i = 0; i < m_hand_frames_num; i++)
12 {
13 euler_vec.push_back(Eigen::Vector3d(0.0, 0.0, 0.0));
14 }
15
16 // Set euler angles
17 for(size_t i = 0; i < m_hand_map.size(); i++)
18 {
19 // Get hand map i
20 HandMap config_i = m_hand_map.at(i);
21
22 // Define euler vector
23 euler_vec.at(config_i.frame_id)(config_i.rot_type) =
24 config_i.rot_dir * joint_angles.at(i);
25 }
26
27 return euler_vec;
28}
std::vector< HandMap > m_hand_map
Definition: animated_hand.h:39
int m_hand_frames_num
Definition: animated_hand.h:56
Here is the caller graph for this function:

Member Data Documentation

◆ m_hand_frames_num

int AnimatedHand::m_hand_frames_num = 9
private

Definition at line 56 of file animated_hand.h.

◆ m_hand_idx_iter

std::vector<int> AnimatedHand::m_hand_idx_iter = {3, 4, 5, 6, 7, 8, 0, 1, 2}
private

Definition at line 59 of file animated_hand.h.

◆ m_hand_map

std::vector<HandMap> AnimatedHand::m_hand_map
private
Initial value:
{
HandMap{0, 3, 2, 1},
HandMap{0, 3, 1, 1},
HandMap{1, 4, 1, 1},
HandMap{2, 5, 1, 1},
HandMap{3, 6, 2, 1},
HandMap{3, 6, 1, 1},
HandMap{4, 7, 1, 1},
HandMap{5, 8, 1, 1},
HandMap{6, 0, 0, 1},
HandMap{6, 0, 1, 1},
HandMap{6, 0, 2, 1},
HandMap{7, 1, 1, 1},
HandMap{8, 2, 1, 1},
}

Definition at line 39 of file animated_hand.h.


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