From 91b8b80735cff0a1c844609a1edda7a6c0993b4f Mon Sep 17 00:00:00 2001 From: PIMA Date: Wed, 20 Mar 2013 07:03:32 -0700 Subject: [PATCH] make sure if the point is lost we pick that up --- nodes/ardrone_follow.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nodes/ardrone_follow.py b/nodes/ardrone_follow.py index 0e5d44c..1c26d14 100755 --- a/nodes/ardrone_follow.py +++ b/nodes/ardrone_follow.py @@ -219,6 +219,9 @@ class ArdroneFollow: self.found_point.x = self.found_point.x * self.alpha + data.x * ( 1.0 - self.alpha ) self.found_point.y = self.found_point.y * self.alpha + data.y * ( 1.0 - self.alpha ) self.found_point.z = self.found_point.z * self.alpha + data.z * ( 1.0 - self.alpha ) + else: + self.found_point = data + self.found_time = rospy.Time.now() def hover( self ):