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

Last change on this file since 263 was 263, checked in by Sanahuja Guillaume, 4 years ago

CircleFollower: remove depdency to cameras

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 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
42 enum class BehaviourMode_t {
43 Default,
44 PositionHold,
45 Circle
46 };
47
48 BehaviourMode_t behaviourMode;
49 bool vrpnLost;
50
51 void VrpnPositionHold(void);//flight mode
52 void StartCircle(void);
53 void StopCircle(void);
54 void ExtraSecurityCheck(void);
55 void ExtraCheckPushButton(void);
56 void ExtraCheckJoystick(void);
57 const flair::core::AhrsData *GetOrientation(void) const;
58 void AltitudeValues(float &z,float &dz) const;
59 void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
60 flair::core::AhrsData *GetReferenceOrientation(void);
61 void SignalEvent(Event_t event);
62
63 flair::filter::Pid *uX, *uY;
64
65 flair::core::Vector2Df posHold;
66 float yawHold;
67
68 flair::gui::PushButton *startCircle,*stopCircle,*positionHold;
69 flair::meta::MetaVrpnObject *targetVrpn,*uavVrpn;
70 flair::filter::TrajectoryGenerator2DCircle *circle;
71 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
72};
73
74#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.