Offboard control problem with fixed wing


I am trying to test general control using dronekit with a plane in OFFBOARD mode. I’m starting the SITL with make posix_sitl_default gazebo_plane then connecting with dronekit via udp: I first tried to takeoff the plane in offboard mode, using the set_position_target_local_ned with both the regular typemask and the takeoff_position typemask. I’ve also tried to takeoff using velocity type_mask and no response from PX4. Next I tried to takeoff using MISSION commands which I achieved and then tried to switch into OFFBOARD mode after takeoff. I start sending set_position_target_local_ned commands and successfully switch into OFFBOARD mode, but the plane seems to hold altitude and have a locked heading. The plane just flys away in the same direction and doesn’t seem to react to set_position_target_local_ned commands for position or for velocity (each with the correct typemask). When I use the typemask to allow all controls, only sending x,y,z position and everything else 0, the plane just does a tight loiter. What am I missing here? How do I get the px4 to react to my set_position_target_local_ned commands?

Did you ever figure this one out? I am also using Dronekit to switch to offboard and send it way points to fly too.

@Brian_Duvall Fixed wing offboard position setpoints are now supported and included in v1.10

Would Set points would be like “set_attitute” “go_to_ way_point” ?

Can offboard set points be used with out useing Ros or mavros?


@Brian_Duvall You can also use mavsdk. Not sure what you mean by go_to_waypoint and set_attitude, but you can find here the supported mavlink messages for fixed wing offboard control

Thanks for the reply, I started to use mavsdk but I found out it dose not support airspeed sensor for fixed wing unfortunately.

So in dronekit they have a function called simple_goto and it uses mission_item_send to send a waypoint to pixhawk to fly to.

Base on the link you just shared I would have to use SET_POSITION_TARGET_GLOBAL_INT and make sure it is being sent >2Hz before I try to change modes to offboard. Is this the correct way to think about it?

Really all I am trying to do is to make the plane fly in a particular direction then set desired attitudes of the vehicle. There may be a simpler way to do this then telling the plane to fly to a way point.

@Brian_Duvall Could you clarify what it means by mavsdk not supporting airspeed sensor?

go-to can be also achieved without entering offboard mode

I want to be able to set the air speed velocity of the plane not the ground speed. In this post:

JulianOes told me about MAVSDK and I looked into it but I did not see that this could be done with MAVSDK. Am I wrong??? If so please tell me.

You say go-to can be achieved without entering off board mode. Would this be in MISSION Mode?