add 3 bionic drones subscriber
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
typedef struct global_location{
|
||||
double lat,lon,alt;
|
||||
float heading;
|
||||
int ID;
|
||||
}global_location;
|
||||
|
||||
#endif // GOBAL_LOCATION_H
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
#include <class_model/gps_location.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <algorithm>
|
||||
// #include "rapidjson/document.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
@@ -17,6 +18,9 @@ public:
|
||||
RequestClass();
|
||||
virtual ~RequestClass();
|
||||
global_location get_leader_GPS();
|
||||
global_location get_self_GPS();
|
||||
global_location get_M1_GPS();
|
||||
global_location get_M2_GPS();
|
||||
float get_leader_heading();
|
||||
int get_formation_message();
|
||||
json get_data();
|
||||
@@ -26,17 +30,27 @@ private:
|
||||
ros::NodeHandle node_handle_;
|
||||
|
||||
void Data_callback(const std_msgs::String::ConstPtr &gps);
|
||||
void self_callback(const std_msgs::String::ConstPtr &gps);
|
||||
void M1_callback(const std_msgs::String::ConstPtr &gps);
|
||||
void M2_callback(const std_msgs::String::ConstPtr &gps);
|
||||
void Message_callback(const std_msgs::String::ConstPtr &message);
|
||||
void jsonToString(std::string data);
|
||||
void L_INFO(std::string data);
|
||||
void Bio_INFO(std::string data);
|
||||
float heading;
|
||||
global_location leader_position;
|
||||
global_location self_position,M1_position,M2_position;
|
||||
std::array <int,3> ID {1,2,3};
|
||||
// rapidjson::Document document;
|
||||
json j_data;
|
||||
int self_ID,drone_ID;
|
||||
|
||||
// SUBSCRIBE
|
||||
ros::Subscriber mqtt_data;
|
||||
ros::Subscriber formation_data;
|
||||
ros::Subscriber self_data;
|
||||
ros::Subscriber member1_data;
|
||||
ros::Subscriber member2_data;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user