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

Last change on this file since 126 was 122, checked in by Sanahuja Guillaume, 8 years ago

modifs uav vrpn i686

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:
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);
[23]55 const flair::core::AhrsData *GetOrientation(void) const;
[21]56 void AltitudeValues(float &z,float &dz);
[23]57 void PositionValues(flair::core::Vector2D &pos_error,flair::core::Vector2D &vel_error,float &yaw_ref);
58 flair::core::AhrsData *GetReferenceOrientation(void);
[21]59 void SignalEvent(Event_t event);
60
[23]61 flair::filter::Pid *uX, *uY;
[21]62
[23]63 flair::core::Vector2D posHold;
[21]64 float yawHold;
65
[23]66 flair::gui::PushButton *startCircle,*stopCircle;
[122]67 flair::meta::MetaVrpnObject *targetVrpn,*uavVrpn;
[23]68 flair::filter::TrajectoryGenerator2DCircle *circle;
69 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
[21]70};
71
72#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.