-
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
vehicle_command: add initial frame support (GLOBAL & GLOBAL_RELATIVE_ALT) #23080
base: main
Are you sure you want to change the base?
Conversation
be2c751
to
a3ded08
Compare
I've updated this to actually reject any COMMAND_INT that has a frame other than GLOBAL or GLOBAL_RELATIVE_ALT, however longer term I think it would be more appropriate to push this out to the final handler (eg DO_REPOSITION) where we can have proper granularity for supported/unsupported frames for each command. Additionally we have no way to distinguish the frame being not set (MAV_FRAME 0) from MAV_FRAME_GLOBAL and some commands don't actually require a frame. |
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.
I have some suggestions, will add a commit.
I rebased on main and added my suggestions. I'm not 100% sure if it breaks any flawed but popular use cases that we need to transition. For sure we need testing to make sure there's nothing obvious. |
In my SILT SIH tests the usual stuff with QGC like takeoff, land, goto, orbit all work fine but when I put together a relative altitude goto it flies slowly into the ground like the original issue said. The new logic gets called and add home altitude and parameter but that somehow doesn't matter. Maybe my test is set up wrongly 👀 |
This adds initial frame support to vehicle_command so that things like DO_REPOSITION can specify relative or absolute altitude. Ideally this would be updated to strictly respect the specification and reject anything other than GLOBAL/GLOBAL_RELATIVE_ALT, but for now I've left it open to hopefully not break any compatibility until we can verify.
In the future this can be nicely expanded to support things like MAV_FRAME_LOCAL_NED, MAV_FRAME_GLOBAL_TERRAIN_ALT, MAV_FRAME_BODY_FRD etc.