changes made on the field 27/09

This commit is contained in:
mistSpiri_Vachkiri 2018-09-27 19:51:09 -04:00
parent 1da2084419
commit 92f7a8d1e6
2 changed files with 7 additions and 5 deletions

View File

@ -10,7 +10,8 @@ include "utils/takeoff_heights.bzz"
#State launched after takeoff #State launched after takeoff
AUTO_LAUNCH_STATE = "TASK_ALLOCATE" #AUTO_LAUNCH_STATE = "TASK_ALLOCATE"
AUTO_LAUNCH_STATE = "IDLE"
TARGET = 9.0 TARGET = 9.0
EPSILON = 30.0 EPSILON = 30.0
ROOT_ID = 3 ROOT_ID = 3

View File

@ -746,19 +746,20 @@ script
{ {
case NAV_TAKEOFF: case NAV_TAKEOFF:
goto_pos = buzzuav_closures::getgoto(); goto_pos = buzzuav_closures::getgoto();
goto_pos[0] = cur_pos.x; goto_pos[0] = 0.0;
goto_pos[1] = cur_pos.y; goto_pos[1] = 0.0;
cmd_srv.request.param5 = cur_pos.latitude; cmd_srv.request.param5 = cur_pos.latitude;
cmd_srv.request.param6 = cur_pos.longitude; cmd_srv.request.param6 = cur_pos.longitude;
cmd_srv.request.param7 = goto_pos[2]; cmd_srv.request.param7 = goto_pos[2];
cmd_srv.request.command = buzzuav_closures::getcmd(); cmd_srv.request.command = buzzuav_closures::getcmd();
if (!armstate) if (!armstate)
{ {
if(setmode) if(setmode){
SetMode("LOITER", 0); SetMode("LOITER", 0);
ros::Duration(0.5).sleep();
}
armstate = 1; armstate = 1;
Arm(); Arm();
ros::Duration(0.5).sleep();
// Registering HOME POINT. // Registering HOME POINT.
home = cur_pos; home = cur_pos;
BClpose = true; BClpose = true;