source: flair-src/trunk/demos/TwoWheelRobotSimpleFleet/ugv/src/SimpleFleet.h@ 441

Last change on this file since 441 was 435, checked in by Sanahuja Guillaume, 3 years ago

add logs to ugv

File size: 1.8 KB
Line 
1// created: 2020/12/21
2// filename: SimpleFleet.h
3//
4// author: Guillaume Sanahuja
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: demo simple fleet avec optitrack
10//
11//
12/*********************************************************************/
13
14#ifndef SIMPLEFLEET_H
15#define SIMPLEFLEET_H
16
17#include <Thread.h>
18
19namespace flair {
20 namespace core {
21 class UdpSocket;
22 }
23 namespace gui {
24 class PushButton;
25 class DoubleSpinBox;
26 }
27 namespace filter {
28 class TrajectoryGenerator2DCircle;
29 class Pid;
30 }
31 namespace meta {
32 class MetaVrpnObject;
33 }
34 namespace sensor {
35 class TargetController;
36 }
37}
38
39class SimpleFleet : public flair::core::Thread {
40 public:
41 SimpleFleet(std::string name,std::string broadcast,flair::sensor::TargetController *controller);
42 ~SimpleFleet();
43
44 private:
45
46 enum class BehaviourMode_t {
47 Manual,
48 Circle
49 };
50
51 void Run(void);
52 void StartCircle(void);
53 void StopCircle(void);
54 void ComputeManualControls(void);
55 void ComputeCircleControls(void);
56 void SecurityCheck(void);
57 void CheckMessages(void);
58 void CheckJoystick(void);
59 void CheckPushButton(void);
60
61 flair::filter::Pid *uX, *uY;
62 flair::gui::PushButton *startCircle,*stopCircle,*button_kill,*button_start_log,*button_stop_log;
63 flair::gui::DoubleSpinBox *l;
64 flair::gui::DoubleSpinBox *xCircleCenter,*yCircleCenter;
65 flair::meta::MetaVrpnObject *ugvVrpn;
66 flair::filter::TrajectoryGenerator2DCircle *circle;
67 BehaviourMode_t behaviourMode;
68 bool vrpnLost;
69 flair::sensor::TargetController *controller;
70 flair::core::UdpSocket *message;
71};
72
73#endif // SIMPLEFLEET_H
Note: See TracBrowser for help on using the repository browser.