Kinematics Animation Multithread
include
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
9
class
AnimatedHand
10
{
11
12
public
:
13
AnimatedHand
() {};
14
15
struct
HandMap
16
{
17
// Frame's unique index
18
int
frame_idx
;
19
20
// Frames name/id
21
int
frame_id
;
22
23
//Rotation type sequence of rotations (roll=0, pitch=1, yaw=2)
24
int
rot_type
;
25
26
// Rotation direction (1: positive, -1:negative)
27
double
rot_dir
;
28
};
29
30
public
:
31
32
// Generate hand angles
33
std::vector<Eigen::Vector3d>
34
get_hand_angles
(
const
std::vector<double>& joint_angles);
35
36
37
private
:
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
56
int
m_hand_frames_num
= 9;
57
58
// Hand index iterator
59
std::vector<int>
m_hand_idx_iter
= {3, 4, 5, 6, 7, 8, 0, 1, 2};
60
};
AnimatedHand
Definition:
animated_hand.h:10
AnimatedHand::m_hand_map
std::vector< HandMap > m_hand_map
Definition:
animated_hand.h:39
AnimatedHand::m_hand_idx_iter
std::vector< int > m_hand_idx_iter
Definition:
animated_hand.h:59
AnimatedHand::get_hand_angles
std::vector< Eigen::Vector3d > get_hand_angles(const std::vector< double > &joint_angles)
Definition:
animated_hand.cpp:4
AnimatedHand::AnimatedHand
AnimatedHand()
Definition:
animated_hand.h:13
AnimatedHand::m_hand_frames_num
int m_hand_frames_num
Definition:
animated_hand.h:56
euler_rotations.h
AnimatedHand::HandMap
Definition:
animated_hand.h:16
AnimatedHand::HandMap::frame_idx
int frame_idx
Definition:
animated_hand.h:18
AnimatedHand::HandMap::rot_type
int rot_type
Definition:
animated_hand.h:24
AnimatedHand::HandMap::frame_id
int frame_id
Definition:
animated_hand.h:21
AnimatedHand::HandMap::rot_dir
double rot_dir
Definition:
animated_hand.h:27
Generated by
1.9.4