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

Last change on this file since 471 was 342, checked in by Sanahuja Guillaume, 5 years ago

up

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