source: flair-src/trunk/lib/FlairMeta/src/Uav.h@ 121

Last change on this file since 121 was 121, checked in by Sanahuja Guillaume, 7 years ago

modifs camera

File size: 2.8 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Uav.h
7 * \brief Base class to construct sensors/actuators depending on uav type
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/01/22
10 * \version 3.4
11 */
12
13#ifndef HDSUAV_H
14#define HDSUAV_H
15
16#include <Object.h>
17
18namespace flair {
19namespace core {
20class FrameworkManager;
21}
22namespace filter {
23class Ahrs;
24class UavMultiplex;
25}
26namespace actuator {
27class Bldc;
28}
29namespace sensor {
30class UsRangeFinder;
31class BatteryMonitor;
32class VrpnClient;
33class Imu;
34class Camera;
35}
36}
37
38namespace flair {
39namespace meta {
40class MetaUsRangeFinder;
41class MetaVrpnObject;
42
43/*! \class Uav
44*
45* \brief Base class to construct sensors/actuators depending on uav type
46*/
47class Uav : public core::Object {
48public:
49 /*
50 typedef enum {
51 None,
52 Auto,//rt serial if hds x4 ou x8, auto ip sinon
53 AutoIP,
54 UserDefinedIP,
55 AutoSerialPort,
56 } VRPNType_t;
57*/
58 // uav_name: for optitrack
59 Uav(core::FrameworkManager *parent, std::string name,
60 filter::UavMultiplex *multiplex = NULL);
61 ~Uav();
62 void SetupVRPN(std::string optitrack_address, std::string name);
63 // vrpn serial: broken, need to add serial port in uav specific code
64 // void SetupVRPNSerial(core::SerialPort *vrpn_port,std::string name,int
65 // VRPNSerialObjectId);
66 virtual void SetupVRPNAutoIP(std::string name);
67
68 virtual void StartSensors(void);
69 void UseDefaultPlot(void);
70 actuator::Bldc *GetBldc(void) const;
71 filter::UavMultiplex *GetUavMultiplex(void) const;
72 sensor::Imu *GetImu(void) const;
73 filter::Ahrs *GetAhrs(void) const;
74 MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
75 sensor::UsRangeFinder *GetUsRangeFinder(void) const;
76 sensor::BatteryMonitor *GetBatteryMonitor(void) const;
77 sensor::VrpnClient *GetVrpnClient(void) const;
78 meta::MetaVrpnObject *GetVrpnObject(void) const;
79 sensor::Camera *GetVerticalCamera(void) const;
80 sensor::Camera *GetHorizontalCamera(void) const;
81
82protected:
83 void SetBldc(const actuator::Bldc *bldc);
84 void SetMultiplex(const filter::UavMultiplex *multiplex);
85 void SetAhrs(const filter::Ahrs *ahrs);
86 void SetUsRangeFinder(const sensor::UsRangeFinder *us);
87 void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
88 void SetVerticalCamera(const sensor::Camera *verticalCamera);
89 void SetHorizontalCamera(const sensor::Camera *verticalCamera);
90
91private:
92 sensor::Imu *imu;
93 filter::Ahrs *ahrs;
94 actuator::Bldc *bldc;
95 filter::UavMultiplex *multiplex;
96 sensor::UsRangeFinder *us;
97 MetaUsRangeFinder *meta_us;
98 sensor::VrpnClient *vrpnclient;
99 MetaVrpnObject *uav_vrpn;
100 sensor::BatteryMonitor *battery;
101 sensor::Camera *verticalCamera,*horizontalCamera;
102};
103} // end namespace meta
104} // end namespace flair
105#endif // HDSUAV_H
Note: See TracBrowser for help on using the repository browser.