From 65d7d3f5a88790f1368189350554babbeba71c59 Mon Sep 17 00:00:00 2001 From: Fang Wu Date: Wed, 26 Sep 2018 12:50:27 -0400 Subject: [PATCH] Check for negative values of altitude modified: src/rosbuzz/src/roscontroller.cpp --- src/roscontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index db83311..355e338 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -44,7 +44,7 @@ logical_clock(ros::Time()), previous_step_time(ros::Time()) SetStreamRate(0, 10, 1); // Get Home position - wait for none-zero value - while (cur_pos.latitude == 0.0f) + while ((cur_pos.latitude == 0.0f) || (cur_pos.altitude < -1000.0)) { ROS_INFO("Waiting for GPS. "); ros::Duration(0.5).sleep();