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

Weather vane working inconsistently #13725

Closed
xdwgood opened this issue Dec 11, 2019 · 2 comments · Fixed by #13761
Closed

Weather vane working inconsistently #13725

xdwgood opened this issue Dec 11, 2019 · 2 comments · Fixed by #13761

Comments

@xdwgood
Copy link
Contributor

xdwgood commented Dec 11, 2019

Describe the bug
Through simulation in gazebo, I found that the vane will work in LAND and RTL mode only after I have performed the mission task. If I do not execute the mission mode, the vane in land and rtl mode will never work

To Reproduce
Steps to reproduce the behavior:

  1. Fetch latest master branch
    2.Add debug code PX4_INFO("1111") here: https://github.com/PX4/Firmware/blob/master/src/lib/flight_tasks/tasks/Auto/FlightTaskAuto.cpp#L249
  2. run make px4_sitl_default gazebo_tailsitter
  3. Execute one-click take-off command by QGC
  4. switch land mode by QGC
    5.No debug output 1111 during landing
    6.Execute one-click take-off command by QGC
    7.Execute survey mission command by QGC
    8.switch position mode by QGC
    9.switch Land/RTL mode by QGC
    10.debug output 1111 during landing/rtl

Expected behavior
For me: I want the vane algorithm to work properly in LAND and RTL mode, and don’t rely on whether I have ever performed a mission(survey)

EDIT On the other hand: If we only want to activate the weather vane function under the mission task, we can add pos_sp_triplet-> current.allow_weather_vane = false after the mission is completed. But I prefer the weather vane to work in land and RTL

Source of the problem
This problem is caused by:
This (_sub_triplet_setpoint.get().current.allow_weather_vane)condition is true only when the mission task is executed. here: https://github.com/PX4/Firmware/blob/master/src/modules/navigator/mission.cpp#L692

Possible related links:
#10883

@xdwgood
Copy link
Contributor Author

xdwgood commented Dec 11, 2019

I solved this problem by adding pos_sp_triplet-> current.allow_weather_vane = true in LAND and RTL;

Can we make allow_weather_vane default to true?
FYI: @sfuhrer

@xdwgood
Copy link
Contributor Author

xdwgood commented Dec 19, 2019

fix by #13761

@xdwgood xdwgood closed this as completed Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant