for my research project, I would like to control a fixed wing UAV from outside the flight stack. After implementing the MAVROS offboard example, I modified the publisher to:
The offboard node seems to correctly publish the topic, since both the Iris and VTOL airframes (Gazebo) take off and fly as expected. However, the fixed wing plane does not.
I took a closer look at the position_setpoint_triplet and the vehicle_attitude_setpoint topics, to conclude that the fw_pos_control_l1 module does not transform the position setpoints to attitude setpoints as expected (in offboard mode). Whereas the mc_pos_control does publish roll, pitch, yaw, yaw rate and thrust setpoints, the fw_pos_control does not.
To be honest, I do not have a clue on how to make it work. Can someone take a look at this please? Any help would be greatly appreciated. Thanks!
Hm, that’s a good question. I’m not sure if offboard control is enabled for fixedwing. Fixedwing are usually controlled using mission items (waypoints). Is that not an option?
@JulianOes, are you saying that the PX4 firmware doesn’t allow fixedwings to receive new heading deviation during the flight from an onboard computer (e.g. to avoid an obstacle), and this is only supported on multirotors?
Thanks for your replies! In the end, the goal is to send altitude, velocity (preferably airspeed), and heading angle setpoints in real-time. The plane should then be able to (very) closely follow a path in a HITL simulation.
For now, I think it is good to know if there are people able to make the fixed wing position controller transform the position setpoint messages in offboard mode. And how they managed.
Or should I focus on the multicopter control for offboard mode?
I believe the attitude setpoint works with fixed wings in offboard mode. It seems like this would be more reasonable than publishing position setpoints
Unfortunately, there was no response on Slack. I think the best thing you can do is dive into the code and try out things in simulation an see how far you get.
I’d be interested to add offboard control for fixedwing to the DronecodeSDK if we manage to find out what’s supported.
Hey, I am working on same topic for a project now. However, my skills are mostly related to aerodynamics part. Is there any development with your search about this topic? I would like to get some help and ideas Thanks!
I was able to send commands for the setpoint_raw/attitude mavros node when in offboard mode in HITL. Can control roll, pitch, and yaw that way. However, I am still trying to figure out how to control velocity and hopefully local or global position in the end.
@Jaeyoung-Lim are supporting velocity setpoints for fw in the works right now? When I enter offboard mode and send attitude setpoints to xplane (working with HIL here) the plane goes to zero throttle and its airspeed drops.
Thank you for the response. I flashed the master to my Pixhawk but HIL mode with XPlane is not working properly now. When I start the mission in mission mode the plane does not move and qgc tells me the plan is complete. There is also some other weird behavior in HIL mode too. It was working with v1.9.2, but not with this master. Do I need to wait for the stable release of 1.10 to get HIL mode working again?
I would like to reproduce this at some point and maybe I can check why it doesn’t work on master/v1.10 anymore. I think it’s mostly because none of the maintainers is using it and would be realizing when it breaks and fix it.
If you can debug it and get it back in working shape that would be very much appreciated.
@JulianOes yes, those are the steps I used for v1.9.2, which worked without issue. Would be happy to provide more setup instructions that I used if needed. Thanks