You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
793 B
C++

/*Subscribe Data Which MQTT Pubilsh */
#ifndef REQUESTDATA_H
#define REQUESTDATA_H
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <string>
#include <class_model/gps_location.h>
class RequestClass {
public:
RequestClass();
virtual ~RequestClass();
global_location get_leader_GPS();
float get_leader_heading();
std::string get_formation_message();
private:
// ROS NodeHandle
ros::NodeHandle node_handle_;
void Data_callback(const std_msgs::String::ConstPtr &gps);
void Message_callback(const std_msgs::String::ConstPtr &message);
void jsonToInt(std::string data);
void jsonToString(std::string data);
float heading;
// SUBSCRIBE
ros::Subscriber mqtt_data;
ros::Subscriber formation_data;
};
#endif // REQUESTDATA_H