File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ bool DJIMatricePSDKPlatform::ownSetPlatformControlMode(const as2_msgs::msg::Cont
198
198
{
199
199
// Obtain control authority
200
200
RCLCPP_INFO (this ->get_logger (), " HOVER || SPEED MODE: Obtain control authority" );
201
+ success = ctl_authority_;
201
202
break ;
202
203
}
203
204
default :
@@ -276,6 +277,9 @@ bool DJIMatricePSDKPlatform::ownTakeoff()
276
277
bool success = result && response->success ;
277
278
if (!success) {
278
279
RCLCPP_INFO (this ->get_logger (), " Could not takeoff due to '%s'" , response->message .data ());
280
+ } else {
281
+ // sleep 10 seconds to wait for the takeoff
282
+ rclcpp::sleep_for (std::chrono::seconds (10 ));
279
283
}
280
284
return success;
281
285
}
@@ -290,6 +294,9 @@ bool DJIMatricePSDKPlatform::ownLand()
290
294
bool success = result && response->success ;
291
295
if (!success) {
292
296
RCLCPP_INFO (this ->get_logger (), " Could not land due to '%s'" , response->message .data ());
297
+ } else {
298
+ // sleep 10 seconds to wait for the land
299
+ rclcpp::sleep_for (std::chrono::seconds (10 ));
293
300
}
294
301
return success;
295
302
}
You can’t perform that action at this time.
0 commit comments