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

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

igep to flair

File size: 1.8 KB
RevLine 
[21]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
[23]19namespace flair {
[21]20 namespace gui {
21 class PushButton;
22 }
23 namespace filter {
24 class TrajectoryGenerator2DCircle;
25 }
26 namespace meta {
27 class MetaVrpnObject;
28 }
29}
30
[23]31class CircleFollower : public flair::meta::UavStateMachine {
[21]32 public:
[23]33 CircleFollower(flair::meta::Uav* uav);
[21]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);
[23]52 const flair::core::AhrsData *GetOrientation(void) const;
[21]53 void AltitudeValues(float &z,float &dz);
[23]54 void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
55 flair::core::AhrsData *GetReferenceOrientation(void);
[21]56 void SignalEvent(Event_t event);
57
[23]58 flair::filter::Pid *uX, *uY;
[21]59
[23]60 flair::core::Vector2D posHold;
[21]61 float yawHold;
62
[23]63 flair::gui::PushButton *startCircle,*stopCircle;
64 flair::meta::MetaVrpnObject *targetVrpn;
65 flair::filter::TrajectoryGenerator2DCircle *circle;
66 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
[21]67};
68
69#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.