Add class "PubInfo" to publish drone's formation type and mission.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#ifndef INFO_H
|
||||
#define INFO_H
|
||||
|
||||
#include<std/string.hpp>
|
||||
|
||||
typedef struct flight_INFO
|
||||
{
|
||||
std::string type, //type include drone's formation. ex: V , X ,| ......
|
||||
mission; //The mission is what we want the drone to do.
|
||||
}INFO;
|
||||
|
||||
|
||||
|
||||
#endif INFO_H
|
||||
@@ -0,0 +1,31 @@
|
||||
/*Publish Drone's status to topic "Flight_Information_reciver"*/
|
||||
#ifndef PUBINFO_H
|
||||
#define PUBINFO_H
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <diagnostic_msgs/KeyValue.h>
|
||||
#include "class_model/INFO.h"
|
||||
|
||||
|
||||
class PubInfoClass {
|
||||
public:
|
||||
PubInfoClass();
|
||||
virtual ~PubInfoClass();
|
||||
void pub_info(INFO msg);
|
||||
|
||||
|
||||
private:
|
||||
// ROS NodeHandle
|
||||
ros::NodeHandle node_handle_;
|
||||
|
||||
//SUBSCRIBE
|
||||
|
||||
//PUBLISH
|
||||
ros::Publisher PubInfo;
|
||||
INFO msg;
|
||||
diagnostic_msgs::KeyValue info;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // PUBINFO_H
|
||||
Reference in New Issue
Block a user