From 6d91edfe5bace9fb4aaaea937406a4f0933659a3 Mon Sep 17 00:00:00 2001 From: Louis-Guillaume DUBOIS Date: Tue, 12 May 2015 17:44:01 +0200 Subject: [PATCH] auto hover when bad Plan --- src/commande.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commande.cpp b/src/commande.cpp index 1678d2f..db31282 100644 --- a/src/commande.cpp +++ b/src/commande.cpp @@ -91,7 +91,7 @@ class Run dz = (z_current - z_previous)/((t_current - t_previous).toSec()); ROS_INFO("dz = %f", dz); } - + xx = msg->normal.x; ROS_INFO("xx = %f", xx); yy = msg->normal.y; @@ -107,6 +107,8 @@ class Run ROS_INFO("first msg received"); } ROS_INFO("coords updated"); + } else { + xx = yy = dz = 0.; } };