From 8ec124b463d93a6f14cade50f6ac8eff1c197900 Mon Sep 17 00:00:00 2001
From: bucyril <bucyril@ethz.ch>
Date: Tue, 23 May 2017 16:04:46 +0200
Subject: [PATCH] =?UTF-8?q?ads=C3=B6lfj?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/d_fall_pps/src/CircleControllerService.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/pps_ws/src/d_fall_pps/src/CircleControllerService.cpp b/pps_ws/src/d_fall_pps/src/CircleControllerService.cpp
index cfa437bc..9394205c 100755
--- a/pps_ws/src/d_fall_pps/src/CircleControllerService.cpp
+++ b/pps_ws/src/d_fall_pps/src/CircleControllerService.cpp
@@ -52,8 +52,8 @@ CrazyflieData previousLocation;
 
 //circle stuff
 float currentTime;
-const float OMEGA = 0.5*2*PI;
-const float RADIUS = 0.35;
+const float OMEGA = 0.25*2*PI;
+const float RADIUS = 0.25;
 
 //point publisher for FollowCrazyflieService
 ros::Publisher followPublisher;
@@ -146,7 +146,7 @@ void convertIntoBodyFrame(float est[9], float (&state)[9], float yaw_measured) {
 void calculateCircle(Setpoint &circlePoint){
     circlePoint.x = RADIUS*cos(OMEGA*currentTime);
     circlePoint.y = RADIUS*sin(OMEGA*currentTime);
-    circlePoint.z = 0.5;
+    circlePoint.z = 0;
     circlePoint.yaw = OMEGA*currentTime;
 
 }
@@ -207,7 +207,13 @@ bool calculateControlOutput(Controller::Request &request, Controller::Response &
 
     previousLocation = request.ownCrazyflie;
 
-    followPublisher.publish(previousLocation);
+    Setpoint pubSetpoint;
+    pubSetpoint.x = previousLocation.x;
+    pubSetpoint.y = previousLocation.y;
+    pubSetpoint.z = previousLocation.z;
+    pubSetpoint.yaw = previousLocation.yaw;
+
+    followPublisher.publish(pubSetpoint);
     
 	return true;
 }
-- 
GitLab