From 15280f4034237ae5650945b3c7e0404f2ce2a111 Mon Sep 17 00:00:00 2001 From: Benjamin Ramtoula Date: Tue, 25 Sep 2018 20:11:58 -0400 Subject: [PATCH 1/4] Add spiris takeoff heights --- buzz_scripts/include/utils/takeoff_heights.bzz | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buzz_scripts/include/utils/takeoff_heights.bzz b/buzz_scripts/include/utils/takeoff_heights.bzz index 4838861..588afb4 100644 --- a/buzz_scripts/include/utils/takeoff_heights.bzz +++ b/buzz_scripts/include/utils/takeoff_heights.bzz @@ -6,5 +6,8 @@ takeoff_heights ={ .6 = 3.0, .9 = 15.0, .11 = 6.0, - .16 = 9.0 + .16 = 9.0, + .17 = 3.0, + .18 = 6.0, + .19 = 9.0 } \ No newline at end of file From 0c69ad6d7881cf7a533fb3c06e2df9f43fdf73a1 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 26 Sep 2018 11:21:30 -0400 Subject: [PATCH 2/4] Change the auto launch state modified: src/rosbuzz/buzz_scripts/main.bzz --- buzz_scripts/main.bzz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buzz_scripts/main.bzz b/buzz_scripts/main.bzz index 3cf751e..6d63d39 100644 --- a/buzz_scripts/main.bzz +++ b/buzz_scripts/main.bzz @@ -9,7 +9,7 @@ include "timesync.bzz" include "utils/takeoff_heights.bzz" #State launched after takeoff -AUTO_LAUNCH_STATE = "IDLE" +AUTO_LAUNCH_STATE = "TASK_ALLOCATE" #AUTO_LAUNCH_STATE = "CUSFUN" #Lowest robot id in the network LOWEST_ROBOT_ID = 0 From 65d7d3f5a88790f1368189350554babbeba71c59 Mon Sep 17 00:00:00 2001 From: Fang Wu Date: Wed, 26 Sep 2018 12:50:27 -0400 Subject: [PATCH 3/4] 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(); From 2372149b8371027c9e9241c5dc2849e4082cca10 Mon Sep 17 00:00:00 2001 From: bramtoula Date: Wed, 26 Sep 2018 15:11:29 -0400 Subject: [PATCH 4/4] Add spiri case to cmdlinectr.sh --- misc/cmdlinectr.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/misc/cmdlinectr.sh b/misc/cmdlinectr.sh index 4e78d7e..f7e41dd 100644 --- a/misc/cmdlinectr.sh +++ b/misc/cmdlinectr.sh @@ -39,7 +39,7 @@ function updaterobot { echo "Installing launch file for TX-ubuntu16 with usb2serial" echo "With xbeemav" rosrun robot_upstart install --logdir /media/key/ROS_WS/log/ dji_sdk_mistlab/launch_robot/m100TX16US.launch - elif [ "$1" = 1 ] && [ "$2" = "X" ] + elif [ "$1" = 1 ] && [ "$2" = "X" ] then echo "Installing launch file for TX-ubuntu16" echo "With xbeemav" @@ -54,12 +54,17 @@ function updaterobot { echo "Installing launch file for Solo" echo "With xbeemav" rosrun robot_upstart install --logdir /media/key/ROS_WS/log/ dji_sdk_mistlab/launch_robot/solo.launch - elif [ "$1" = 0 ] && [ "$2" = "H" ] + elif [ "$1" = 4 ] && [ "$2" = "X" ] + then + echo "Installing launch file for Spiris" + echo "With xbeemav" + rosrun robot_upstart install --logdir /media/key/ROS_WS/log/ dji_sdk_mistlab/launch_robot/spiri.launch + elif [ "$1" = 0 ] && [ "$2" = "H" ] then echo "Installing launch file for TX-ubuntu16 with usb2serial" echo "With heavenmav" rosrun robot_upstart install --logdir /media/key/ROS_WS/log/ dji_sdk_mistlab/launch_robot/m100TX16USHeaven.launch - elif [ "$1" = 1 ] && [ "$2" = "H" ] + elif [ "$1" = 1 ] && [ "$2" = "H" ] then echo "Installing launch file for TX-ubuntu16" echo "With heavenmav"