-
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 DO_SET_SPEED commands outside of missions in other AUTO modes #18834
Conversation
VTOLSpeedAirspeedChanges.mp4This is an early draft on the groundstation side. |
This is super cool! |
6c7326e
to
8238af9
Compare
- update _mission_cruising_speed_mc/_fw also if DO_CHANGE_SPEED command is received outside of mission (e.g. while Loitering doing an Orbit) - if vehicle is in AUTO_LOITER when receiving the change speed, then immediately apply it by doing a reposition without updating any other field than cruising_speed and cruising_throttle -when RTL is activated reset the cruising speed and throttle Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
8238af9
to
9d533ba
Compare
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.
@sfuhrer I just realized that when you set a speed in mc mode and then transition, the fw controller will use the same speed setpoint. Can you have a look at that?
…itioning Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Yes good point, I'd say we should always reset the speed and throttle setpoint when transitioning: 30179e1 It's a bit unfortunate that the transition command isn't passed through in the position_setpoint, that would make the things easier and prob more deterministic. Now I had to trigger a repo setpoint update (similar to when a DO_CHANGE_SPEED is received). Don't see any immediate issue with it, we should though go through all cases in testing. |
This is awesome @sfuhrer ! |
Given that the QGC implementation is now there in a PR I go ahead and merge this. |
But it doesn't work when the Fix-wing in offboard mode |
Please open a new issue or ask on discord, as stated this PR wasn't about offboard but AUTO modes. |
Replaces #18605.
Describe problem solved by this pull request
flying in high wind with an airspeed setpoint close to stall is dangerous due to increased external disturbances, so the airspeed setpoint should ideally be increased in these situationsDescribe your solution
Speed setpoint slider:
(Note: no PR yet for QGC side) Introduce a slider in the flyview of QGC to change the current speed setpoint. For MC this would be groundspeed, for FW/VTOLs in FW mode airspeed. After confirming the set value of the slider, QGC sends the MAVLink command DO_CHANGE_SPEED. Navigator stores the received value in _mission_cruising_speed_mc/_fw, and applies it from there on for every new AUTO action (e.g. GoTo, Loiter etc). For it to have immediate effect if vehicle is in AUTO_LOITER when receiving the change speed, apply it by doing a reposition without updating any other field than cruising_speed and cruising_throttle.
DO_CHANGE_SPEED waypoints in mission have the same interface. They override the value set through the slider in the flyview.
When RTL is activated reset the cruising speed and throttle.
Wind-based adaption: (not sure if we need this anymore with #18810)There is an offset added to the minimum airspeed setpoint: setpoint +=
FW_WIND_ARSP_SC
* abs(wind). So if the scale is set to 0.2, then for 10m/s there are 2m/s added to the setpoint that help making the vehicle's attitude control more robust to disturbances caused by the high wind, plus reduces the chance of a groundspeed undershoot.EDIT: removed the wind-based adaption from this PR, and also split out the airspeed setpoint handling in the FW position controller: #18841
Describe possible alternatives
Test data / coverage
SITL tested.
Additional context