Goodmorning,
I am trying to land a drone on a mobile vehicle via offboard control. I am able to land the drone on the platform, however when it moves with speed approximately higher than 1km/h, the drone doesn’t allow the disarm (or landing) procedure. Its blades keep spinning until the vehicle stops. I think this is due to the drone assuming it is flying.
Is there a way to switch off everything? I didn’t find any vehicle command for that.
Thank you for your help,
Gennaro
1 Like
Thank you. I finally solved it by enabling the flight termination command using the vehicle command n°185. To do this, the parameter CBRK_FLIGHTTERM must be modified, according to Parameter Reference | PX4 User Guide. Moreover, in order to make the drone detect the landing on the moving platform, the parameter LNDMC_XY_VEL_MAX must be modified, according to the preferred moving platform speed.
Thanks @gennscar for your feedback. Can you please clarify what you mean by n°185 command ?
Yes, I mean sending a command on the topic VehicleCommand_PubSubTopic, where command is equal to 185, param1 to 1.0 and param2 to 0.0.
Indeed, the command “VEHICLE_CMD_DO_FLIGHTTERMINATION” is the number 185.
msg = VehicleCommand()
msg.timestamp = self.timestamp
msg.param1 = param1
msg.param2 = param2
msg.command = command
msg.target_system = 1
msg.source_system = 1
msg.source_component = 1
msg.from_external = True
self.vehicle_command_publisher_.publish(msg)
Hi @gennscar, when I perform the “VEHICLE_CMD_DO_FLIGHTTERMINATION” the propellers reduce the speed but they continue rotating. Did you change other parameters apart from CBRK_FLIGHTTERM?
Thanks in advance.
MrPotato
May I inquire how to import VehicleCommand() ?
Are you using ROS2? I am using ROS1 noetic on Ubuntu 20.04.
I try to add the command in the python offboard control script.
However, I get the error “ERROR: name ‘VehicleCommand’ is not defined”
Thank you very much