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

Last change on this file since 432 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
RevLine 
[376]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;
[379]22 class DoubleSpinBox;
[376]23 }
24 namespace filter {
25 class TrajectoryGenerator2DCircle;
[377]26 class Pid;
[376]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 {
[379]44 Manual,
[376]45 Circle
46 };
47
[379]48 void Run(void);
[376]49 void StartCircle(void);
50 void StopCircle(void);
[379]51 void ComputeManualControls(void);
52 void ComputeCircleControls(void);
[389]53 void SecurityCheck(void);
54 void CheckJoystick(void);
55 void CheckPushButton(void);
[376]56
57 flair::filter::Pid *uX, *uY;
58 flair::gui::PushButton *startCircle,*stopCircle,*button_kill;
[379]59 flair::gui::DoubleSpinBox *l;
[377]60 flair::meta::MetaVrpnObject *targetVrpn,*ugvVrpn;
[376]61 flair::filter::TrajectoryGenerator2DCircle *circle;
[379]62 BehaviourMode_t behaviourMode;
63 bool vrpnLost;
64 flair::sensor::TargetController *controller;
[376]65};
66
67#endif // CIRCLEFOLLOWER_H
Note: See TracBrowser for help on using the repository browser.