Offboard Control Help

#1

Hello,

I am trying to figure out the best method in which to handle my task using offboard control and mavros. I basically just need guidance on the mavros portion. I want the drone to begin in a landed state until a GPS lat, long, coordinate target is received. Then it will rise up to 6 feet and move to those coordinates and land there. What is the best way to do this with mavros? Should I use the setpoint_position/global with my GPS coordinates? Is it even possible to takeoff and land as I would like with a python script?

#2

@Aurash_Norouzi Yes it is possible.

You can either use rospy to use python or use a node in c++ something like this

#3

Hi Jaeyoung,

Thanks so much for all your work. I have seen your examples as well on 404warehouse site. I have seen all these examples, but I am a bit lost as to the logic for implementation. I have a real drone with Pixhawk cube using RPI3 with mavros on telem2. If I send set_point/global messages to my drone which take LLA (lat,long,alt) do I need to perform takeoff with the takeoff service as well or does the PX4 firmware handle this?

#4

@Aurash_Norouzi The code is thoroughly explained in the documentation.

The answer is no, the firmware will not handle it automatically and it is not safe to do so.

You would have to arm / switch the drone to Offboard mode with either a service or manually and send setpoints repeatedly within the timeout(0.5s)