source: flair-src/trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.h@ 390

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

update demo code

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1// created: 2020/12/09
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 <Thread.h>
18
19namespace flair {
20 namespace gui {
21 class PushButton;
22 class DoubleSpinBox;
23 }
24 namespace filter {
25 class TrajectoryGenerator2DCircle;
26 class Pid;
27 }
28 namespace meta {
29 class MetaVrpnObject;
30 }
31 namespace sensor {
32 class TargetController;
33 }
34}
35
36class CircleFollower : public flair::core::Thread {
37 public:
38 CircleFollower(std::string name,flair::sensor::TargetController *controller);
39 ~CircleFollower();
40
41 private:
42
43 enum class BehaviourMode_t {
44 Manual,
45 Circle
46 };
47
48 void Run(void);
49 void StartCircle(void);
50 void StopCircle(void);
51 void ComputeManualControls(void);
52 void ComputeCircleControls(void);
53 void SecurityCheck(void);
54 void CheckJoystick(void);
55 void CheckPushButton(void);
56
57 flair::filter::Pid *uX, *uY;
58 flair::gui::PushButton *startCircle,*stopCircle,*button_kill;
59 flair::gui::DoubleSpinBox *l;
60 flair::meta::MetaVrpnObject *targetVrpn,*ugvVrpn;
61 flair::filter::TrajectoryGenerator2DCircle *circle;
62 BehaviourMode_t behaviourMode;
63 bool vrpnLost;
64 flair::sensor::TargetController *controller;
65};
66
67#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.