|
|
|
@ -8,6 +8,7 @@
|
|
|
|
#include "class_model/control.h"
|
|
|
|
#include "class_model/control.h"
|
|
|
|
#include "class_model/command.h"
|
|
|
|
#include "class_model/command.h"
|
|
|
|
#include "class_model/requestData.h"
|
|
|
|
#include "class_model/requestData.h"
|
|
|
|
|
|
|
|
#include "class_model/DroneStatus.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FollowerClass {
|
|
|
|
class FollowerClass {
|
|
|
|
@ -20,7 +21,12 @@ public:
|
|
|
|
ControlClass control_object;
|
|
|
|
ControlClass control_object;
|
|
|
|
CommandClass command_object;
|
|
|
|
CommandClass command_object;
|
|
|
|
RequestClass request_object;
|
|
|
|
RequestClass request_object;
|
|
|
|
|
|
|
|
DroneStatus drone1;
|
|
|
|
|
|
|
|
DroneStatus drone2;
|
|
|
|
|
|
|
|
DroneStatus drone3;
|
|
|
|
|
|
|
|
|
|
|
|
void follower();
|
|
|
|
void follower();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
// ROS NodeHandle
|
|
|
|
// ROS NodeHandle
|
|
|
|
ros::NodeHandle node_handle_;
|
|
|
|
ros::NodeHandle node_handle_;
|
|
|
|
@ -30,6 +36,9 @@ private:
|
|
|
|
global_location leader_location;
|
|
|
|
global_location leader_location;
|
|
|
|
|
|
|
|
|
|
|
|
void calculate_position(float k,float theta);
|
|
|
|
void calculate_position(float k,float theta);
|
|
|
|
|
|
|
|
void plane(global_location target_location,global_location leader_location,global_location follower_location);
|
|
|
|
|
|
|
|
void choose_leader();
|
|
|
|
|
|
|
|
void follow();
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|