Skip to content
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

VTOL: disable WV when moving #13782

Merged
merged 4 commits into from
Feb 7, 2020
Merged

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Dec 24, 2019

This PR disables weather vane (WV) when moving. Background is that when moving lateral, the roll offset required for this motion also introduces a yawing rate from the WV. This is normally not desired for VTOL when flying in windy conditions, as then the nose of the vehicle gets turned out of the wind, leading to crosswind or tailwind situations.

After this PR, the weather vane would still be active when:

  • no stick inputs while flying in manual position controlled mode
  • when the velocity setpoint is below half of the mission hover velocity (MPC_XY_CRUISE ), which is typically the case in loiter, takeoff and land situations in auto (mission) mode

In low-wind conditions it it could maybe be desired to have the WV always active in auto mode (like it is now), such that the vehicle automatically yaws in direction of flight. We could thus add a parameter to enable WV in auto mode also when moving. Or instead of making the threshold for WV on/off depending on MC_XY_CRUISE like it is now, making a threshold parameter (which, when set to a high velocity, would always enable WV).
I'm currently rather for the option without another parameter if it can be avoided.

@sfuhrer sfuhrer added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Dec 24, 2019
@sfuhrer sfuhrer self-assigned this Dec 24, 2019
RomanBapst
RomanBapst previously approved these changes Jan 30, 2020
Copy link
Contributor

@RomanBapst RomanBapst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sfuhrer If this works better for VTOL then I'm fine with bringing it in.

… if position isn't locked

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Use yawrate setpoint from weather vane only if velocity setpoint is small
(smaller than half the cruise velocity)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer
Copy link
Contributor Author

sfuhrer commented Feb 6, 2020

Found an issue with the previous implementation, fixed it and flight tested it again now. No conceptual changes, so I assume you're still okay with that @RomanBapst ?

@codecov
Copy link

codecov bot commented Feb 7, 2020

Codecov Report

Merging #13782 into master will decrease coverage by 0.41%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13782      +/-   ##
==========================================
- Coverage   36.44%   36.02%   -0.42%     
==========================================
  Files         587      548      -39     
  Lines       49337    47003    -2334     
==========================================
- Hits        17982    16935    -1047     
+ Misses      31355    30068    -1287
Flag Coverage Δ
#mavsdk 36.02% <0%> (?)
#sitl_mission_FW ?
#sitl_mission_MC_box ?
#sitl_mission_MC_offboard_att ?
#sitl_mission_MC_offboard_pos ?
#sitl_mission_Rover ?
#sitl_mission_VTOL_standard ?
#sitl_mission_VTOL_tailsitter ?
#sitl_python_FW ?
#sitl_python_MC_box ?
#sitl_python_MC_offboard_att ?
#sitl_python_MC_offboard_pos ?
#sitl_python_Rover ?
#sitl_python_VTOL_standard ?
#sitl_python_VTOL_tailsitter ?
#unittest ?
Impacted Files Coverage Δ
...modules/rover_pos_control/RoverPositionControl.hpp 0% <0%> (-100%) ⬇️
src/modules/land_detector/RoverLandDetector.cpp 0% <0%> (-100%) ⬇️
...fw_pos_control_l1/runway_takeoff/RunwayTakeoff.cpp 6.09% <0%> (-93.91%) ⬇️
...rc/modules/land_detector/FixedwingLandDetector.cpp 0% <0%> (-93.34%) ⬇️
src/lib/mixer/NullMixer/NullMixer.cpp 0% <0%> (-84.62%) ⬇️
src/lib/pid/pid.cpp 0% <0%> (-72.59%) ⬇️
platforms/posix/src/px4/common/lib_crc32.c 0% <0%> (-66.67%) ⬇️
...s/fw_pos_control_l1/runway_takeoff/RunwayTakeoff.h 16.66% <0%> (-66.67%) ⬇️
...modules/rover_pos_control/RoverPositionControl.cpp 0% <0%> (-63.87%) ⬇️
src/modules/land_detector/LandDetector.h 22.22% <0%> (-55.56%) ⬇️
... and 127 more

@bkueng bkueng merged commit a3710fc into master Feb 7, 2020
@bkueng bkueng deleted the pr-disable-WV-when-moving-master branch February 7, 2020 15:46
@mrpollo mrpollo mentioned this pull request Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants