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

Last change on this file since 38 was 38, checked in by Bayard Gildas, 8 years ago

Modif. pour ajour manette émulée (EmulatedController)

File size: 1.9 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 namespace sensor {
30 class TargetController;
31 }
32}
33
34class CircleFollower : public flair::meta::UavStateMachine {
35 public:
36 CircleFollower(flair::meta::Uav* uav,flair::sensor::TargetController *controller);
37 ~CircleFollower();
38
39 private:
40 enum class BehaviourMode_t {
41 Default,
42 PositionHold,
43 Circle
44 };
45
46 BehaviourMode_t behaviourMode;
47 bool vrpnLost;
48
49 void VrpnPositionHold(void);//flight mode
50 void StartCircle(void);
51 void StopCircle(void);
52 void ExtraSecurityCheck(void);
53 void ExtraCheckPushButton(void);
54 void ExtraCheckJoystick(void);
55 const flair::core::AhrsData *GetOrientation(void) const;
56 void AltitudeValues(float &z,float &dz);
57 void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
58 flair::core::AhrsData *GetReferenceOrientation(void);
59 void SignalEvent(Event_t event);
60
61 flair::filter::Pid *uX, *uY;
62
63 flair::core::Vector2D posHold;
64 float yawHold;
65
66 flair::gui::PushButton *startCircle,*stopCircle;
67 flair::meta::MetaVrpnObject *targetVrpn;
68 flair::filter::TrajectoryGenerator2DCircle *circle;
69 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
70};
71
72#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.