Kinematics Animation Multithread
animated_hand.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <vector>
5#include <map>
6#include "euler_rotations.h"
7
8
10{
11
12public:
14
15 struct HandMap
16 {
17 // Frame's unique index
19
20 // Frames name/id
22
23 //Rotation type sequence of rotations (roll=0, pitch=1, yaw=2)
25
26 // Rotation direction (1: positive, -1:negative)
27 double rot_dir;
28 };
29
30public:
31
32 // Generate hand angles
33 std::vector<Eigen::Vector3d>
34 get_hand_angles(const std::vector<double>& joint_angles);
35
36
37private:
38
39 std::vector<HandMap> m_hand_map {
40 HandMap{0, 3, 2, 1},
41 HandMap{0, 3, 1, 1},
42 HandMap{1, 4, 1, 1},
43 HandMap{2, 5, 1, 1},
44 HandMap{3, 6, 2, 1},
45 HandMap{3, 6, 1, 1},
46 HandMap{4, 7, 1, 1},
47 HandMap{5, 8, 1, 1},
48 HandMap{6, 0, 0, 1},
49 HandMap{6, 0, 1, 1},
50 HandMap{6, 0, 2, 1},
51 HandMap{7, 1, 1, 1},
52 HandMap{8, 2, 1, 1},
53 };
54
55 // Number of hand frames
57
58 // Hand index iterator
59 std::vector<int> m_hand_idx_iter = {3, 4, 5, 6, 7, 8, 0, 1, 2};
60};
std::vector< HandMap > m_hand_map
Definition: animated_hand.h:39
std::vector< int > m_hand_idx_iter
Definition: animated_hand.h:59
std::vector< Eigen::Vector3d > get_hand_angles(const std::vector< double > &joint_angles)
int m_hand_frames_num
Definition: animated_hand.h:56