GAMS  1.4.0
GAMSAutonomy.h
Go to the documentation of this file.
1 #ifndef INCLUDE_SCRIMMAGE_PLUGINS_AUTONOMY_GAMSAUTONOMY_H_
2 #define INCLUDE_SCRIMMAGE_PLUGINS_AUTONOMY_GAMSAUTONOMY_H_
3 
4 #ifdef _GAMS_SCRIMMAGE_
5 
6 #include <scrimmage/autonomy/Autonomy.h>
7 #include <scrimmage/math/State.h>
8 #include <scrimmage/pubsub/Publisher.h>
9 #include <scrimmage/proto/State.pb.h>
10 #include <scrimmage/msgs/Event.pb.h>
11 #include <scrimmage/proto/ProtoConversions.h>
12 #include <string>
13 #include <map>
14 
15 namespace scrimmage {
16 namespace autonomy {
17 
18 class GAMSAutonomy : public scrimmage::Autonomy {
19 
20  public:
21  GAMSAutonomy();
22  void init(std::map<std::string, std::string> &params) override;
23  bool step_autonomy(double t, double dt) override;
24  /*
25  GAMS Algorithms move() will call this to set the state,
26  the autonomy function step() will read it and propogate
27  through SCRIMMAGE
28  */
29 
30  protected:
31  uint8_t position_x_idx_ = 0;
32  uint8_t position_y_idx_ = 0;
33  uint8_t position_z_idx_ = 0;
34 
35  scrimmage::PublisherPtr pub_gen_ents_;
36 
37 }; // end class GAMSAutonomy
38 } // ns scrimmage
39 } // ns autonomy
40 
41 #endif // #ifdef _GAMS_SCRIMMAGE_
42 
43 #endif