source: flair-src/trunk/demos/CircleFollower/uav/src/CircleFollower.h@ 23

Last change on this file since 23 was 23, checked in by Sanahuja Guillaume, 6 years ago

igep to flair

File size: 1.8 KB
Line 
1// created: 2011/05/01
2// filename: CircleFollower.h
3//
4// author: Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: demo cercle avec optitrack
10//
11//
12/*********************************************************************/
13
14#ifndef CIRCLEFOLLOWER_H
15#define CIRCLEFOLLOWER_H
16
17#include <UavStateMachine.h>
18
19namespace flair {
20 namespace gui {
21 class PushButton;
22 }
23 namespace filter {
24 class TrajectoryGenerator2DCircle;
25 }
26 namespace meta {
27 class MetaVrpnObject;
28 }
29}
30
31class CircleFollower : public flair::meta::UavStateMachine {
32 public:
33 CircleFollower(flair::meta::Uav* uav);
34 ~CircleFollower();
35
36 private:
37 enum class BehaviourMode_t {
38 Default,
39 PositionHold,
40 Circle
41 };
42
43 BehaviourMode_t behaviourMode;
44 bool vrpnLost;
45
46 void VrpnPositionHold(void);//flight mode
47 void StartCircle(void);
48 void StopCircle(void);
49 void ExtraSecurityCheck(void);
50 void ExtraCheckPushButton(void);
51 void ExtraCheckJoystick(void);
52 const flair::core::AhrsData *GetOrientation(void) const;
53 void AltitudeValues(float &z,float &dz);
54 void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
55 flair::core::AhrsData *GetReferenceOrientation(void);
56 void SignalEvent(Event_t event);
57
58 flair::filter::Pid *uX, *uY;
59
60 flair::core::Vector2D posHold;
61 float yawHold;
62
63 flair::gui::PushButton *startCircle,*stopCircle;
64 flair::meta::MetaVrpnObject *targetVrpn;
65 flair::filter::TrajectoryGenerator2DCircle *circle;
66 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
67};
68
69#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.