From 7c438c23234678a55415b9d96656be97cb4187f9 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 3 Oct 2018 21:43:11 -0400 Subject: [PATCH 1/2] removed the need for setmode with m100 adapter --- src/roscontroller.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index fbcc069..e401299 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -165,7 +165,7 @@ void roscontroller::RosControllerRun() flight_controller_service_call(); // Broadcast local position to FCU if(BClpose) - SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]); + 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)) { From 0d2304116092196feca6320e38527089a987be88 Mon Sep 17 00:00:00 2001 From: vivek-shankar Date: Thu, 4 Oct 2018 16:06:45 -0400 Subject: [PATCH 2/2] Local setpoint fix for the solos. --- src/roscontroller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index e401299..c27bd31 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -164,7 +164,7 @@ void roscontroller::RosControllerRun() // Call the flight controler service flight_controller_service_call(); // Broadcast local position to FCU - if(BClpose) + 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(); @@ -838,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: