From 46eb1ff7e385093f6c18af06c5c24f3dc4f456f2 Mon Sep 17 00:00:00 2001 From: weiweikong Date: Mon, 2 Jan 2017 21:41:46 +0800 Subject: [PATCH 1/3] fix bugs for DISCO --- bebop_driver/launch/bebop_node.launch | 2 +- bebop_driver/src/bebop_driver_nodelet.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bebop_driver/launch/bebop_node.launch b/bebop_driver/launch/bebop_node.launch index 1f60a38..6612882 100644 --- a/bebop_driver/launch/bebop_node.launch +++ b/bebop_driver/launch/bebop_node.launch @@ -10,6 +10,6 @@ - + diff --git a/bebop_driver/src/bebop_driver_nodelet.cpp b/bebop_driver/src/bebop_driver_nodelet.cpp index e0a32a2..a4aeb5f 100644 --- a/bebop_driver/src/bebop_driver_nodelet.cpp +++ b/bebop_driver/src/bebop_driver_nodelet.cpp @@ -536,7 +536,8 @@ void BebopDriverNodelet::AuxThread() if (bebop_ptr_->ardrone3_pilotingstate_positionchanged_ptr) { gps_state_ptr = bebop_ptr_->ardrone3_pilotingstate_positionchanged_ptr->GetDataCstPtr(); - if ((gps_state_ptr->header.stamp - last_gps_time).toSec() > util::eps) + //if ((gps_state_ptr->header.stamp - last_gps_time).toSec() > util::eps) + if (gps_state_ptr && ((gps_state_ptr->header.stamp - last_gps_time).toSec() > util::eps)) { last_gps_time = gps_state_ptr->header.stamp; new_gps_state = true; @@ -559,7 +560,7 @@ void BebopDriverNodelet::AuxThread() speed_esd_ptr = bebop_ptr_->ardrone3_pilotingstate_speedchanged_ptr->GetDataCstPtr(); // conside new data only - if ((speed_esd_ptr->header.stamp - last_speed_time).toSec() > util::eps) + if (speed_esd_ptr && ((speed_esd_ptr->header.stamp - last_speed_time).toSec() > util::eps)) { last_speed_time = speed_esd_ptr->header.stamp; new_speed_data = true; From 78546d6f06e70e62af4905cb9afdaf8dce54ce57 Mon Sep 17 00:00:00 2001 From: weiweikong Date: Mon, 9 Jan 2017 13:51:31 +0800 Subject: [PATCH 2/3] revert bebop_node.launch --- bebop_driver/launch/bebop_node.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bebop_driver/launch/bebop_node.launch b/bebop_driver/launch/bebop_node.launch index 6612882..062b314 100644 --- a/bebop_driver/launch/bebop_node.launch +++ b/bebop_driver/launch/bebop_node.launch @@ -10,6 +10,6 @@ - + From 160f40fecaee192d74dccaf07f2682fce9b3ed0d Mon Sep 17 00:00:00 2001 From: weiweikong Date: Mon, 9 Jan 2017 16:16:37 +0800 Subject: [PATCH 3/3] typo --- bebop_driver/launch/bebop_node.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bebop_driver/launch/bebop_node.launch b/bebop_driver/launch/bebop_node.launch index 062b314..1f60a38 100644 --- a/bebop_driver/launch/bebop_node.launch +++ b/bebop_driver/launch/bebop_node.launch @@ -10,6 +10,6 @@ - +