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
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;
[239]25 class CvtColor;
[21]26 }
27 namespace meta {
28 class MetaVrpnObject;
29 }
[38]30 namespace sensor {
31 class TargetController;
32 }
[21]33}
34
[23]35class CircleFollower : public flair::meta::UavStateMachine {
[21]36 public:
[122]37 CircleFollower(flair::sensor::TargetController *controller);
[21]38 ~CircleFollower();
39
40 private:
[239]41 flair::filter::CvtColor* greyCameraImage;
42
43 enum class BehaviourMode_t {
[21]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);
[23]58 const flair::core::AhrsData *GetOrientation(void) const;
[167]59 void AltitudeValues(float &z,float &dz) const;
60 void PositionValues(flair::core::Vector2Df &pos_error,flair::core::Vector2Df &vel_error,float &yaw_ref);
[23]61 flair::core::AhrsData *GetReferenceOrientation(void);
[21]62 void SignalEvent(Event_t event);
63
[23]64 flair::filter::Pid *uX, *uY;
[21]65
[167]66 flair::core::Vector2Df posHold;
[21]67 float yawHold;
68
[171]69 flair::gui::PushButton *startCircle,*stopCircle,*positionHold;
[122]70 flair::meta::MetaVrpnObject *targetVrpn,*uavVrpn;
[23]71 flair::filter::TrajectoryGenerator2DCircle *circle;
72 flair::core::AhrsData *customReferenceOrientation,*customOrientation;
[21]73};
74
75#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.