-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkernelgraph.h
More file actions
61 lines (42 loc) · 1.31 KB
/
kernelgraph.h
File metadata and controls
61 lines (42 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <boost/shared_ptr.hpp>
#include <qi/log.hpp>
#include <queue>
#include <fstream>
#include <alcommon/albroker.h>
#include <alproxies/almotionproxy.h>
#include <alproxies/albasicawarenessproxy.h>
#include <alproxies/alautonomouslifeproxy.h>
#include <alproxies/alrobotpostureproxy.h>
#include "primalgraph.h"
namespace AL
{
class ALBroker;
}
class KernelGraph : public PrimalGraph {
public:
KernelGraph(boost::shared_ptr<AL::ALBroker> broker_);
Vertex GetCurrentState() const;
bool RunChain(const std::vector <std::string>& chain,
int cnt,
float acceleration = DEFAULT_ACCELERATION);
bool Run(const std::string& v_name, float time = DEFAULT_TIME);
void Run(const Vertex* v, float time = DEFAULT_TIME);
void Rest() const;
void Wake() const;
void StrongRest() const;
void StrongWake() const;
void BehaviorOff() const;
void Move(float x, float y, float theta);
void RightKick();
void LeftKick();
private:
void RunWay(std::vector <const Edge*> edges, float acceleration);
void Rotate(float theta);
void GoForward(float len);
float GetRealAngle(float theta) const;
private:
boost::shared_ptr<AL::ALBroker> broker_;
mutable AL::ALMotionProxy motion_;
mutable AL::ALAutonomousLifeProxy life_proxy;
mutable AL::ALRobotPostureProxy posture_;
};