Kinematics Animation Multithread
src
animated_hand.cpp
Go to the documentation of this file.
1
#include "../include/animated_hand.h"
2
3
// Generate hand angles
4
std::vector<Eigen::Vector3d>
AnimatedHand::get_hand_angles
(
const
5
std::vector<double>& joint_angles)
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
}
AnimatedHand::m_hand_map
std::vector< HandMap > m_hand_map
Definition:
animated_hand.h:39
AnimatedHand::get_hand_angles
std::vector< Eigen::Vector3d > get_hand_angles(const std::vector< double > &joint_angles)
Definition:
animated_hand.cpp:4
AnimatedHand::m_hand_frames_num
int m_hand_frames_num
Definition:
animated_hand.h:56
AnimatedHand::HandMap
Definition:
animated_hand.h:16
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