Merge commit '0d2304116092196feca6320e38527089a987be88' into sim

This commit is contained in:
Fang Wu 2018-10-18 11:15:01 -04:00
commit 55c8b0346d
1 changed files with 4 additions and 4 deletions

View File

@ -164,8 +164,8 @@ void roscontroller::RosControllerRun()
// Call the flight controler service
flight_controller_service_call();
// Broadcast local position to FCU
if(BClpose)
SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]);
if(BClpose && !setmode)
SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]);
// Set ROBOTS variable (swarm size)
get_number_of_robots();
buzz_utility::set_robot_var(no_of_robots);
@ -762,7 +762,6 @@ script
Arm();
// Registering HOME POINT.
home = cur_pos;
BClpose = true;
}
if (current_mode != "GUIDED" && setmode)
SetMode("GUIDED", 2000); // added for compatibility with 3DR Solo
@ -792,7 +791,6 @@ script
{
armstate = 0;
Arm();
BClpose = false;
}
if (mav_client.call(cmd_srv))
{
@ -840,6 +838,8 @@ script
case NAV_SPLINE_WAYPOINT:
goto_pos = buzzuav_closures::getgoto();
if(setmode)
SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]);
break;
case DO_MOUNT_CONTROL: