Revision 0c8d22a5 include/humotion/server/eyelid_motion_generator.h
include/humotion/server/eyelid_motion_generator.h | ||
---|---|---|
25 | 25 |
* Excellence Initiative. |
26 | 26 |
*/ |
27 | 27 |
|
28 |
#pragma once |
|
29 |
#include "eye_motion_generator.h" |
|
30 |
#include "boost/date_time/posix_time/posix_time.hpp" |
|
28 |
#ifndef INCLUDE_HUMOTION_SERVER_EYELID_MOTION_GENERATOR_H_ |
|
29 |
#define INCLUDE_HUMOTION_SERVER_EYELID_MOTION_GENERATOR_H_ |
|
30 |
|
|
31 |
#include <boost/date_time/posix_time/posix_time.hpp> |
|
31 | 32 |
#include <boost/thread/thread_time.hpp> |
32 | 33 |
|
33 |
namespace humotion{ |
|
34 |
namespace server{ |
|
34 |
#include "humotion/server/eye_motion_generator.h" |
|
35 |
|
|
36 |
namespace humotion { |
|
37 |
namespace server { |
|
35 | 38 |
|
36 |
class EyelidMotionGenerator : public EyeMotionGenerator{ |
|
37 |
public: |
|
38 |
EyelidMotionGenerator(JointInterface *j); |
|
39 |
class EyelidMotionGenerator : public EyeMotionGenerator {
|
|
40 |
public:
|
|
41 |
explicit EyelidMotionGenerator(JointInterface *j);
|
|
39 | 42 |
~EyelidMotionGenerator(); |
40 | 43 |
|
41 | 44 |
void calculate_targets(); |
... | ... | |
43 | 46 |
|
44 | 47 |
|
45 | 48 |
|
46 |
private: |
|
49 |
private:
|
|
47 | 50 |
bool saccade_blink_active; |
48 | 51 |
bool saccade_blink_requested; |
49 | 52 |
|
50 |
enum SIDE_ID{ |
|
53 |
enum SIDE_ID {
|
|
51 | 54 |
LEFT = 0, |
52 | 55 |
RIGHT, |
53 | 56 |
SIDE_ID_SIZE |
... | ... | |
62 | 65 |
void handle_eyeblink_timeout(); |
63 | 66 |
void override_lids_for_eyeblink(); |
64 | 67 |
void check_for_saccade(); |
65 |
void start_eyeblink(int side, int duration=EYEBLINK_DURATION_MS);
|
|
68 |
void start_eyeblink(int side, int duration = EYEBLINK_DURATION_MS);
|
|
66 | 69 |
|
67 | 70 |
void close_eyelid(int joint_id); |
68 | 71 |
|
... | ... | |
75 | 78 |
boost::system_time periodic_blink_start_time; |
76 | 79 |
boost::system_time eyeblink_timeout[SIDE_ID_SIZE]; |
77 | 80 |
boost::system_time eyeblink_blocked_timeout; |
78 |
|
|
79 | 81 |
}; |
80 | 82 |
|
81 |
} |
|
82 |
} |
|
83 |
} // namespace server |
|
84 |
} // namespace humotion |
|
85 |
|
|
86 |
#endif // INCLUDE_HUMOTION_SERVER_EYELID_MOTION_GENERATOR_H_ |
Also available in: Unified diff