-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable offboard position setpoints for Fixedwing position control #12532
Conversation
8316dec
to
4d7a1bb
Compare
Rebased due to merge conflicts. @bresch Would appreciate it if you could review this. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, but we would need to test a bit more. Did you try to enable/disable offboard during a mission flight?
@bresch Here is a log of switching back and forth from mission mode and offboard mode https://review.px4.io/plot_app?log=06293060-4b34-42c6-a3e6-c9ae07209432 |
@bresch Can we get this merged? |
@PX4/testflights can you test that on a fixedwing/vtol please? |
Tested on Fixed Wing(Phantom) Pixhawk 1 v2: Modes Tested
Procedure Notes: Log: |
Thanks @Junkim3DR . |
My fixed wing is still unable to execute local position setpoints while in offboard mode using xplane10 HITL. I am running PX4 version 1.9.2, flashed from qgc. I am able to toggle to offboard mode via my RC when I publish attitude setpoint values through mavros. However, I am unable to toggle to offboard mode via my RC when I publish local position setpoint values through mavros. Additionally, when I publish attitude setpoint and local position setpoint values through mavros, I am able to enter offboard mode but the pixhawk only reacts to changes in the attitude setpoint values. Should this functionality be working with version 1.9.2 at this point in time? |
@apoissant95 I don't think this change was part of 1.9.2 |
Ah. So how could I get this added functionality onto my Pixhawk? Are there plans to release these changes onto the Pixhawk firmware downloaded via qgc? |
@apoissant95 You can build master of this repo and upload to the pixhawk yourself. I believe it should be included in the next release |
@Jaeyoung-Lim I flashed the beta for v1.10.0 using qgc but I got very strange behavior using fw hitl. Basically, when I would arm mission mode using hitl the plane would slowly turn on the ground for a couple seconds, then qgc would say it completed the uploaded mission, and it would disarm. So I just switched back to v1.9.2 and will play around more with just attitude setpoints until v1.10.0 is released. |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/fixed-wing-position-control-using-v1-15-flight-modes/42871/1 |
Describe problem solved by the proposed pull request
When streaming offboard position setpoint messages (
SET_POSITION_TARGET_LOCAL_NED
) for fixed wing, it is able to enter offboard mode (as offboard position setpoints are streamed) but unable to follow any setpoint and results in a flyaway. (#12517 ). Part of the reason is that fixed wing position control is based on global coordinates, while px4 does not support global position setpoints.This PR enables local position setpoints to be consumed by the fixedwing position controller in offboard mode as a L1 reference position. This PR depends on PX4/PX4-ECL#624
Test data / coverage
This has been tested in SITL by sending a position setpoint at [200.0, 200.0, 30.0]m
https://review.px4.io/plot_app?log=98d07b9f-bfd2-4bb7-9daf-66cb68893ec1
To reproduce,
Describe your preferred solution
Local position setpoints are converted into global setpoints that can be consumed from the fixedwing position controller.
Additional context
Recently offboard attitude setpoints have been started to work in fixed wing. #12311 #12149
Having able to control a fixed wing vehicle with highlevel setpoints such as position, whill greatly enhance the autonomy of fixed wing vehicle missions in offboard mode