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

Last change on this file since 241 was 239, checked in by Bayard Gildas, 6 years ago

tests

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