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: set cruise_speed to default on entering new mode #21503

Merged
merged 1 commit into from
May 5, 2023

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Apr 21, 2023

Follow up on #21414.

The resets in the modes (eg Loiter mode) are not active yet, so manually set rep->current.cruising_speed = -1.f if not already in the same flight mode.

Test coverage

SITL and flight tested on VTOLs.

The resets in the modes (eg Loiter mode) are not active yet, so manually
set rep->current.cruising_speed = -1.f if not already in the same flight mode.

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

sfuhrer commented May 5, 2023

@RomanBapst this is needed because the Navigator sets the the speed setpoint of the current position_setpoint based on the currently set cruising speed before the stored cruising speed is reset by the mode.
See the printfs when I change the speed in a mission and then switch into Hold mode:

get_cruising_speed(): 20.000000
rest cruising speed

@sfuhrer sfuhrer merged commit d2ca763 into main May 5, 2023
@sfuhrer sfuhrer deleted the pr-navigator-speed-resets-new-mode-main branch May 5, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants