GAMS  1.4.0
AirLibBase.h
Go to the documentation of this file.
1 
8 #ifndef _GAMS_PLATFORM_AIRLIB_BASE_H_
9 #define _GAMS_PLATFORM_AIRLIB_BASE_H_
10 
11 #ifdef _GAMS_AIRLIB_
12 
13 #include "gams/variables/Self.h"
14 #include "gams/variables/Sensor.h"
17 #include "gams/pose/GPSFrame.h"
19 #include "madara/knowledge/KnowledgeBase.h"
20 
21 #ifdef __GNUC__
22 #pragma GCC diagnostic push
23 #pragma GCC diagnostic ignored "-Wpedantic"
24 #endif
25 
26 #ifdef __GNUC__
27 #pragma GCC diagnostic pop
28 #endif
29 
30 #include <iostream>
31 #include <vehicles/multirotor/api/MultirotorRpcLibClient.hpp>
32 
33 namespace gams
34 {
35  namespace platforms
36  {
37  class GAMS_EXPORT AirLibBase : public BasePlatform
38  {
39  public:
47  AirLibBase(
48  madara::knowledge::KnowledgeBase * knowledge,
49  variables::Sensors * sensors,
50  variables::Self * self);
51 
56  virtual int sense(void) override;
57 
62  virtual int analyze(void) override;
63 
68  virtual int land(void) override;
69 
76  int move(const pose::Position & position,
77  const pose::PositionBounds &bounds) override;
78 
79  // inherit BasePlatform's move overloads
80  using BasePlatform::move;
81 
86  virtual void set_move_speed(const double& speed) override;
87 
92  virtual int takeoff(void) override;
93 
98  virtual const pose::ReferenceFrame & get_frame(void) const override;
99 
100 
101  protected:
103  pose::ReferenceFrame * frame_;
104 
105  msr::airlib::MultirotorRpcLibClient client;
109  void wait_for_go() const;
110 
112  bool ready_;
113  }; // class AirLibQuadcopterBase
114  } // namespace platform
115 } // namespace gams
116 
117 #endif // _GAMS_AIRLIB_
118 
119 #endif // _GAMS_PLATFORM_AIRLIB_BASE_H_
Copyright(c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
virtual int move(const pose::Position &target)
Moves the platform to a location.
Definition: BasePlatform.h:230
gams::pose::ReferenceFrame ReferenceFrame
Base class for Reference Frames.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.
Copyright (c) 2015 Carnegie Mellon University.