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

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

CircleFollower: remove depdency to cameras

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