Changeset 44 in flair-dev for trunk/include/FlairMeta
- Timestamp:
- Jan 6, 2017, 1:58:28 PM (8 years ago)
- Location:
- trunk/include/FlairMeta
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairMeta/HdsX8.h
r15 r44 24 24 class HdsX8 : public Uav { 25 25 public: 26 HdsX8( core::FrameworkManager *parent, std::string uav_name,26 HdsX8(std::string name, 27 27 filter::UavMultiplex *multiplex = NULL); 28 28 ~HdsX8(); 29 29 void StartSensors(void); 30 std::string GetDefaultVrpnAddress(void) const{return "192.168.147.197:3883";} 30 31 31 32 private: -
trunk/include/FlairMeta/MetaVrpnObject.h
r13 r44 18 18 19 19 namespace flair { 20 namespace core { 21 class Vector3D; 22 class FloatType; 23 } 24 namespace gui { 25 class DataPlot1D; 26 class DataPlot2D; 27 class Tab; 28 } 29 namespace filter { 30 class EulerDerivative; 31 class LowPassFilter; 32 } 33 namespace sensor { 34 class VrpnClient; 35 } 20 namespace core { 21 class Vector3D; 22 class FloatType; 23 } 24 namespace gui { 25 class DataPlot1D; 26 class DataPlot2D; 27 class Tab; 28 } 29 namespace filter { 30 class EulerDerivative; 31 class LowPassFilter; 32 } 36 33 } 37 34 … … 47 44 class MetaVrpnObject : public sensor::VrpnObject { 48 45 public: 49 MetaVrpnObject(const sensor::VrpnClient *parent, std::string name); 50 MetaVrpnObject(const sensor::VrpnClient *parent, std::string name, 51 uint8_t id); 46 MetaVrpnObject(std::string name); 47 MetaVrpnObject(std::string name,uint8_t id); 52 48 ~MetaVrpnObject(); 53 49 gui::DataPlot1D *VxPlot(void) const; // 1,0 … … 58 54 59 55 private: 60 void ConstructorCommon( const sensor::VrpnClient *parent,std::string name);56 void ConstructorCommon(std::string name); 61 57 filter::LowPassFilter *pbas; 62 58 filter::EulerDerivative *euler; -
trunk/include/FlairMeta/SimuX4.h
r15 r44 26 26 // simu_id: 0 if simulating only one UAV 27 27 //>0 otherwise 28 SimuX4( core::FrameworkManager *parent, std::string uav_name, int simu_id = 0,28 SimuX4(std::string name, int simu_id = 0, 29 29 filter::UavMultiplex *multiplex = NULL); 30 30 ~SimuX4(); 31 31 void StartSensors(void); 32 void SetupVRPNAutoIP(std::string name);33 32 }; 34 33 } // end namespace meta -
trunk/include/FlairMeta/SimuX8.h
r15 r44 26 26 // simu_id: 0 if simulating only one UAV 27 27 //>0 otherwise 28 SimuX8( core::FrameworkManager *parent, std::string uav_name, int simu_id = 0,28 SimuX8(std::string name, int simu_id = 0, 29 29 filter::UavMultiplex *multiplex = NULL); 30 30 ~SimuX8(); 31 31 void StartSensors(void); 32 void SetupVRPNAutoIP(std::string name);33 32 }; 34 33 } // end namespace meta -
trunk/include/FlairMeta/Uav.h
r13 r44 17 17 18 18 namespace flair { 19 namespace core { 20 class FrameworkManager; 21 } 22 namespace filter { 23 class Ahrs; 24 class UavMultiplex; 25 } 26 namespace actuator { 27 class Bldc; 28 } 29 namespace sensor { 30 class UsRangeFinder; 31 class BatteryMonitor; 32 class VrpnClient; 33 class Imu; 34 class Camera; 35 } 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; 31 } 36 32 } 37 33 … … 39 35 namespace meta { 40 36 class MetaUsRangeFinder; 41 class MetaVrpnObject;42 37 43 38 /*! \class Uav 44 39 * 45 * \brief Base class to construct sensors/actuators depending on uav type 40 * \brief Base class to construct sensors/actuators depending on uav type. 41 * The Object is created with 42 * the FrameworkManager as parent. FrameworkManager must be created before. 43 * Only one instance of this class is allowed by program. 46 44 */ 47 45 class Uav : public core::Object { 48 46 public: 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, 47 48 Uav(std::string name, 60 49 filter::UavMultiplex *multiplex = NULL); 61 50 ~Uav(); 62 void SetupVRPN(std::string optitrack_address, std::string name);63 // vrpn serial: broken, need to add serial port in uav specific code64 // void SetupVRPNSerial(core::SerialPort *vrpn_port,std::string name,int65 // VRPNSerialObjectId);66 virtual void SetupVRPNAutoIP(std::string name);67 51 68 virtual void StartSensors(void) ;52 virtual void StartSensors(void)=0; 69 53 void UseDefaultPlot(void); 70 54 actuator::Bldc *GetBldc(void) const; … … 75 59 sensor::UsRangeFinder *GetUsRangeFinder(void) const; 76 60 sensor::BatteryMonitor *GetBatteryMonitor(void) const; 77 sensor::VrpnClient *GetVrpnClient(void) const;78 meta::MetaVrpnObject *GetVrpnObject(void) const;79 61 sensor::Camera *GetVerticalCamera(void) const; 62 sensor::Camera *GetHorizontalCamera(void) const; 63 virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";} 80 64 81 65 protected: … … 86 70 void SetBatteryMonitor(const sensor::BatteryMonitor *battery); 87 71 void SetVerticalCamera(const sensor::Camera *verticalCamera); 72 void SetHorizontalCamera(const sensor::Camera *verticalCamera); 88 73 89 74 private: … … 94 79 sensor::UsRangeFinder *us; 95 80 MetaUsRangeFinder *meta_us; 96 sensor::VrpnClient *vrpnclient;97 MetaVrpnObject *uav_vrpn;98 81 sensor::BatteryMonitor *battery; 99 sensor::Camera *verticalCamera ;82 sensor::Camera *verticalCamera,*horizontalCamera; 100 83 }; 84 85 /*! 86 * \brief get Uav 87 * 88 * \return the Uav 89 */ 90 Uav *GetUav(void); 91 101 92 } // end namespace meta 102 93 } // end namespace flair -
trunk/include/FlairMeta/UavFactory.h
r26 r44 21 21 #include <Uav.h> 22 22 23 flair::meta::Uav *CreateUav(flair::core::FrameworkManager *parent, 24 std::string uav_name, std::string uav_type, 23 flair::meta::Uav *CreateUav(std::string name, std::string type, 25 24 flair::filter::UavMultiplex *multiplex = NULL); 26 25 27 void RegisterUavCreator(flair::meta::Uav*(*func)(flair::core::FrameworkManager *parent, 28 std::string uav_name, std::string uav_type, 26 void RegisterUavCreator(flair::meta::Uav*(*func)(std::string name, std::string type, 29 27 flair::filter::UavMultiplex *multiplex)); 30 28 #endif // UAVFACTORY -
trunk/include/FlairMeta/UavStateMachine.h
r27 r44 59 59 * 60 60 * \brief State machine for UAV 61 * 62 * thread synchronized with ahrs, unless a period is set with SetPeriodUS or 63 *SetPeriodMS 61 * The Thread is created with 62 * the FrameworkManager as parent. FrameworkManager must be created before. 63 * The Thread is synchronized with Ahrs, unless a period is set with SetPeriodUS or 64 * SetPeriodMS 64 65 */ 65 66 … … 101 102 }; 102 103 103 UavStateMachine( meta::Uav* uav,sensor::TargetController* controller);104 UavStateMachine(sensor::TargetController* controller); 104 105 ~UavStateMachine(); 105 106 … … 107 108 108 109 const core::Vector3D &GetCurrentAngularSpeed(void) const; 109 110 const meta::Uav *GetUav(void) const;111 110 112 111 void Land(void); -
trunk/include/FlairMeta/XAir.h
r15 r44 24 24 class XAir : public Uav { 25 25 public: 26 XAir( core::FrameworkManager *parent, std::string uav_name,26 XAir(std::string name, 27 27 filter::UavMultiplex *multiplex = NULL); 28 28 ~XAir(); 29 29 void StartSensors(void); 30 std::string GetDefaultVrpnAddress(void) const{return "192.168.147.197:3883";} 30 31 31 32 private:
Note:
See TracChangeset
for help on using the changeset viewer.