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

Navigator: add set_gimbal_neutral() logic #22458

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Nov 29, 2023

Solved Problem

  • cameras have higher chance to get damaged when pointing down (like they do while flying a survey)
  • on Holding a survey mission, most users seem to prefer to have the camera pan upwards such that they can look at the surroundings

Solution

Introduce set_gimabl_neutral() method that sets gimbal_manager_set_attitude_s::GIMBAL_MANAGER_FLAGS_NEUTRAL. Call it on entering RTL and Land flight modes, as well as when in a mission and the next item is Land, or on pausing a mission.

Changelog Entry

For release notes:

Feature: set gimbal to neutral (horizontal) in Landing scenarios and on pausing a Mission

Test coverage

SITL tested.

To point the gimbal forward eg during landing to reduce chance of damage.

Signed-off-by: Silvan Fuhrer <[email protected]>
To reduce risk of damage during landing.

Signed-off-by: Silvan Fuhrer <[email protected]>
It is generally preferred to have the camera pointing forward on pause,
e.g. to use the camera for Navigation.

Signed-off-by: Silvan Fuhrer <[email protected]>
@sfuhrer sfuhrer merged commit b0df7c7 into main Dec 1, 2023
89 of 90 checks passed
@sfuhrer sfuhrer deleted the pr-set-gimbal-neutral-main branch December 1, 2023 12:19
@julianoes
Copy link
Contributor

One thing to note is that this will set the gimbal to neutral even if it is controlled manually. I guess that's what we want, right?

And also, to be pedantic, this should probably be retracted, however, that's not really implemented anywhere, or at least not any different from neutral, so 🤷‍♂️.

@sfuhrer
Copy link
Contributor Author

sfuhrer commented Dec 5, 2023

One thing to note is that this will set the gimbal to neutral even if it is controlled manually. I guess that's what we want, right?

That's the feedback we got from users, yeah. Better be on the safe side and set it to neutral once too often than risking damage on the landing.

And also, to be pedantic, this should probably be retracted, however, that's not really implemented anywhere, or at least not any different from neutral, so 🤷‍♂️.

Good point. I guess not enough people care yet about the retraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants