From eec2609f88c3e7eeeb7dc0031ff496b7a34647d1 Mon Sep 17 00:00:00 2001 From: Xuan0319 Date: Wed, 4 Jan 2023 17:22:04 +0800 Subject: [PATCH] for experiment --- class_model/src/formation.cpp | 20 +++++++++++--------- class_model/src/main.cpp | 29 ++++++++++++++++++++++------- class_model/src/select.cpp | 2 +- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/class_model/src/formation.cpp b/class_model/src/formation.cpp index cfdfb27..2a5b106 100755 --- a/class_model/src/formation.cpp +++ b/class_model/src/formation.cpp @@ -109,10 +109,11 @@ void FormationClass::leader1(float x,float y){ void FormationClass::follower1(int type){ - std::string command,pre_command = ""; + std::string command = ""; + std::string pre_command = receiver_object.check_command(); int message; while(true){ - + if(type == 0){ calculate_position(4,30); }else if(type == 1){ @@ -130,12 +131,13 @@ void FormationClass::follower1(int type){ command = receiver_object.check_command(); // message = request_object.get_formation_message(); // ROS_INFO("%d",message); + // std::cout<