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

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

ugv update

File size: 2.8 KB
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]4// %flair:license}
[7]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
[377]13#ifndef UAV_H
14#define UAV_H
[7]15
16#include <Object.h>
17
18namespace flair {
[122]19 namespace filter {
20 class Ahrs;
21 class UavMultiplex;
22 }
23 namespace actuator {
24 class Bldc;
25 }
26 namespace sensor {
27 class UsRangeFinder;
28 class BatteryMonitor;
29 class Imu;
30 class Camera;
[185]31 class NmeaGps;
[215]32 class PressureSensor;
[122]33 }
[7]34}
35
36namespace flair {
37namespace meta {
[15]38class MetaUsRangeFinder;
[7]39
[15]40/*! \class Uav
41*
[122]42* \brief Base class to construct sensors/actuators depending on uav type.
43* The Object is created with
44* the FrameworkManager as parent. FrameworkManager must be created before.
45* Only one instance of this class is allowed by program.
[7]46*/
[15]47class Uav : public core::Object {
48public:
[122]49
50 Uav(std::string name,
[15]51 filter::UavMultiplex *multiplex = NULL);
52 ~Uav();
[7]53
[122]54 virtual void StartSensors(void)=0;
[15]55 void UseDefaultPlot(void);
56 actuator::Bldc *GetBldc(void) const;
57 filter::UavMultiplex *GetUavMultiplex(void) const;
58 sensor::Imu *GetImu(void) const;
59 filter::Ahrs *GetAhrs(void) const;
60 MetaUsRangeFinder *GetMetaUsRangeFinder(void) const;
61 sensor::UsRangeFinder *GetUsRangeFinder(void) const;
62 sensor::BatteryMonitor *GetBatteryMonitor(void) const;
63 sensor::Camera *GetVerticalCamera(void) const;
[121]64 sensor::Camera *GetHorizontalCamera(void) const;
[185]65 sensor::NmeaGps *GetGps(void) const;
[215]66 sensor::PressureSensor *GetPressureSensor(void) const;
[122]67 virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
[157]68 virtual bool isReadyToFly(void) const { return true;}
[165]69 virtual std::string GetType(void) const=0;
[7]70
[15]71protected:
72 void SetBldc(const actuator::Bldc *bldc);
73 void SetMultiplex(const filter::UavMultiplex *multiplex);
[173]74 void SetAhrs(const filter::Ahrs *ahrs);//also sets imu (retrieved from the ahrs)
[15]75 void SetUsRangeFinder(const sensor::UsRangeFinder *us);
76 void SetBatteryMonitor(const sensor::BatteryMonitor *battery);
77 void SetVerticalCamera(const sensor::Camera *verticalCamera);
[121]78 void SetHorizontalCamera(const sensor::Camera *verticalCamera);
[185]79 void SetGps(const sensor::NmeaGps *gps);
[215]80 void SetPressureSensor(const sensor::PressureSensor *pressureSensor);
[7]81
[15]82private:
83 sensor::Imu *imu;
[185]84 sensor::NmeaGps *gps;
[15]85 filter::Ahrs *ahrs;
86 actuator::Bldc *bldc;
87 filter::UavMultiplex *multiplex;
88 sensor::UsRangeFinder *us;
89 MetaUsRangeFinder *meta_us;
90 sensor::BatteryMonitor *battery;
[121]91 sensor::Camera *verticalCamera,*horizontalCamera;
[215]92 sensor::PressureSensor *pressureSensor;
[15]93};
[122]94
95/*!
96* \brief get Uav
97*
98* \return the Uav
99*/
100Uav *GetUav(void);
101
[7]102} // end namespace meta
103} // end namespace flair
[377]104#endif // UAV_H
Note: See TracBrowser for help on using the repository browser.